You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
3.5 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. #!/usr/bin/env python
  2. # Setup script for PyPI; use CMakeFile.txt to build extension modules
  3. from setuptools import setup
  4. from pybind11 import __version__
  5. import os
  6. # Prevent installation of pybind11 headers by setting
  7. # PYBIND11_USE_CMAKE.
  8. if os.environ.get('PYBIND11_USE_CMAKE'):
  9. headers = []
  10. else:
  11. headers = [
  12. 'include/pybind11/attr.h',
  13. 'include/pybind11/cast.h',
  14. 'include/pybind11/chrono.h',
  15. 'include/pybind11/class_support.h',
  16. 'include/pybind11/common.h',
  17. 'include/pybind11/complex.h',
  18. 'include/pybind11/descr.h',
  19. 'include/pybind11/eigen.h',
  20. 'include/pybind11/eval.h',
  21. 'include/pybind11/functional.h',
  22. 'include/pybind11/numpy.h',
  23. 'include/pybind11/operators.h',
  24. 'include/pybind11/options.h',
  25. 'include/pybind11/pybind11.h',
  26. 'include/pybind11/pytypes.h',
  27. 'include/pybind11/stl.h',
  28. 'include/pybind11/stl_bind.h',
  29. 'include/pybind11/typeid.h'
  30. ]
  31. setup(
  32. name='pybind11',
  33. version=__version__,
  34. description='Seamless operability between C++11 and Python',
  35. author='Wenzel Jakob',
  36. author_email='wenzel.jakob@epfl.ch',
  37. url='https://github.com/wjakob/pybind11',
  38. download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
  39. packages=['pybind11'],
  40. license='BSD',
  41. headers=headers,
  42. classifiers=[
  43. 'Development Status :: 5 - Production/Stable',
  44. 'Intended Audience :: Developers',
  45. 'Topic :: Software Development :: Libraries :: Python Modules',
  46. 'Topic :: Utilities',
  47. 'Programming Language :: C++',
  48. 'Programming Language :: Python :: 2.7',
  49. 'Programming Language :: Python :: 3',
  50. 'Programming Language :: Python :: 3.2',
  51. 'Programming Language :: Python :: 3.3',
  52. 'Programming Language :: Python :: 3.4',
  53. 'Programming Language :: Python :: 3.5',
  54. 'Programming Language :: Python :: 3.6',
  55. 'License :: OSI Approved :: BSD License'
  56. ],
  57. keywords='C++11, Python bindings',
  58. long_description="""pybind11 is a lightweight header-only library that
  59. exposes C++ types in Python and vice versa, mainly to create Python bindings of
  60. existing C++ code. Its goals and syntax are similar to the excellent
  61. Boost.Python by David Abrahams: to minimize boilerplate code in traditional
  62. extension modules by inferring type information using compile-time
  63. introspection.
  64. The main issue with Boost.Python-and the reason for creating such a similar
  65. project-is Boost. Boost is an enormously large and complex suite of utility
  66. libraries that works with almost every C++ compiler in existence. This
  67. compatibility has its cost: arcane template tricks and workarounds are
  68. necessary to support the oldest and buggiest of compiler specimens. Now that
  69. C++11-compatible compilers are widely available, this heavy machinery has
  70. become an excessively large and unnecessary dependency.
  71. Think of this library as a tiny self-contained version of Boost.Python with
  72. everything stripped away that isn't relevant for binding generation. Without
  73. comments, the core header files only require ~4K lines of code and depend on
  74. Python (2.7 or 3.x, or PyPy2.7 >= 5.7) and the C++ standard library. This
  75. compact implementation was possible thanks to some of the new C++11 language
  76. features (specifically: tuples, lambda functions and variadic templates). Since
  77. its creation, this library has grown beyond Boost.Python in many ways, leading
  78. to dramatically simpler binding code in many common situations.""")