setup.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/usr/bin/env python3
  2. """
  3. setup.py for installing F2PY
  4. Usage:
  5. pip 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 numpy.distutils.core import setup
  16. from numpy.distutils.misc_util import Configuration
  17. from __version__ import version
  18. def configuration(parent_package='', top_path=None):
  19. config = Configuration('f2py', parent_package, top_path)
  20. config.add_subpackage('tests')
  21. config.add_data_dir('tests/src')
  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)