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.

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