setup.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_subpackage('_backends')
  22. config.add_data_dir('tests/src')
  23. config.add_data_files(
  24. 'src/fortranobject.c',
  25. 'src/fortranobject.h',
  26. 'backends/meson.build.template',
  27. )
  28. config.add_data_files('*.pyi')
  29. return config
  30. if __name__ == "__main__":
  31. config = configuration(top_path='')
  32. config = config.todict()
  33. config['classifiers'] = [
  34. 'Development Status :: 5 - Production/Stable',
  35. 'Intended Audience :: Developers',
  36. 'Intended Audience :: Science/Research',
  37. 'License :: OSI Approved :: NumPy License',
  38. 'Natural Language :: English',
  39. 'Operating System :: OS Independent',
  40. 'Programming Language :: C',
  41. 'Programming Language :: Fortran',
  42. 'Programming Language :: Python',
  43. 'Topic :: Scientific/Engineering',
  44. 'Topic :: Software Development :: Code Generators',
  45. ]
  46. setup(version=version,
  47. description="F2PY - Fortran to Python Interface Generator",
  48. author="Pearu Peterson",
  49. author_email="pearu@cens.ioc.ee",
  50. maintainer="Pearu Peterson",
  51. maintainer_email="pearu@cens.ioc.ee",
  52. license="BSD",
  53. platforms="Unix, Windows (mingw|cygwin), Mac OSX",
  54. long_description="""\
  55. The Fortran to Python Interface Generator, or F2PY for short, is a
  56. command line tool (f2py) for generating Python C/API modules for
  57. wrapping Fortran 77/90/95 subroutines, accessing common blocks from
  58. Python, and calling Python functions from Fortran (call-backs).
  59. Interfacing subroutines/data from Fortran 90/95 modules is supported.""",
  60. url="https://numpy.org/doc/stable/f2py/",
  61. keywords=['Fortran', 'f2py'],
  62. **config)