setup.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/env python
  2. """
  3. setup.py for installing F2PY
  4. Usage:
  5. python setup.py install
  6. Copyright 2001-2005 Pearu Peterson all rights reserved,
  7. Pearu Peterson <pearu@cens.ioc.ee>
  8. Permission to use, modify, and distribute this software is given under the
  9. terms of the NumPy License.
  10. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
  11. $Revision: 1.32 $
  12. $Date: 2005/01/30 17:22:14 $
  13. Pearu Peterson
  14. """
  15. from __future__ import division, print_function
  16. from numpy.distutils.core import setup
  17. from numpy.distutils.misc_util import Configuration
  18. from __version__ import version
  19. def configuration(parent_package='', top_path=None):
  20. config = Configuration('f2py', parent_package, top_path)
  21. config.add_data_dir('tests')
  22. config.add_data_files(
  23. 'src/fortranobject.c',
  24. 'src/fortranobject.h')
  25. return config
  26. if __name__ == "__main__":
  27. config = configuration(top_path='')
  28. config = config.todict()
  29. config['download_url'] = "http://cens.ioc.ee/projects/f2py2e/2.x"\
  30. "/F2PY-2-latest.tar.gz"
  31. config['classifiers'] = [
  32. 'Development Status :: 5 - Production/Stable',
  33. 'Intended Audience :: Developers',
  34. 'Intended Audience :: Science/Research',
  35. 'License :: OSI Approved :: NumPy License',
  36. 'Natural Language :: English',
  37. 'Operating System :: OS Independent',
  38. 'Programming Language :: C',
  39. 'Programming Language :: Fortran',
  40. 'Programming Language :: Python',
  41. 'Topic :: Scientific/Engineering',
  42. 'Topic :: Software Development :: Code Generators',
  43. ]
  44. setup(version=version,
  45. description="F2PY - Fortran to Python Interface Generator",
  46. author="Pearu Peterson",
  47. author_email="pearu@cens.ioc.ee",
  48. maintainer="Pearu Peterson",
  49. maintainer_email="pearu@cens.ioc.ee",
  50. license="BSD",
  51. platforms="Unix, Windows (mingw|cygwin), Mac OSX",
  52. long_description="""\
  53. The Fortran to Python Interface Generator, or F2PY for short, is a
  54. command line tool (f2py) for generating Python C/API modules for
  55. wrapping Fortran 77/90/95 subroutines, accessing common blocks from
  56. Python, and calling Python functions from Fortran (call-backs).
  57. Interfacing subroutines/data from Fortran 90/95 modules is supported.""",
  58. url="http://cens.ioc.ee/projects/f2py2e/",
  59. keywords=['Fortran', 'f2py'],
  60. **config)