|
4 | 4 |
|
5 | 5 | from setuptools import setup
|
6 | 6 | from pybind11 import __version__
|
| 7 | +import os |
7 | 8 |
|
8 |
| -setup( |
9 |
| - name='pybind11', |
10 |
| - version=__version__, |
11 |
| - description='Seamless operability between C++11 and Python', |
12 |
| - author='Wenzel Jakob', |
13 |
| - author_email='wenzel.jakob@epfl.ch', |
14 |
| - url='https://github.com/wjakob/pybind11', |
15 |
| - download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__, |
16 |
| - packages=['pybind11'], |
17 |
| - license='BSD', |
18 |
| - headers=[ |
| 9 | +# Prevent installation of pybind11 headers by setting |
| 10 | +# PYBIND11_USE_CMAKE. |
| 11 | +if os.environ.get('PYBIND11_USE_CMAKE'): |
| 12 | + headers = [] |
| 13 | +else: |
| 14 | + headers = [ |
19 | 15 | 'include/pybind11/attr.h',
|
20 | 16 | 'include/pybind11/cast.h',
|
21 | 17 | 'include/pybind11/chrono.h',
|
|
33 | 29 | 'include/pybind11/stl.h',
|
34 | 30 | 'include/pybind11/stl_bind.h',
|
35 | 31 | 'include/pybind11/typeid.h'
|
36 |
| - ], |
| 32 | + ] |
| 33 | + |
| 34 | +setup( |
| 35 | + name='pybind11', |
| 36 | + version=__version__, |
| 37 | + description='Seamless operability between C++11 and Python', |
| 38 | + author='Wenzel Jakob', |
| 39 | + author_email='wenzel.jakob@epfl.ch', |
| 40 | + url='https://github.com/wjakob/pybind11', |
| 41 | + download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__, |
| 42 | + packages=['pybind11'], |
| 43 | + license='BSD', |
| 44 | + headers=headers, |
37 | 45 | classifiers=[
|
38 | 46 | 'Development Status :: 5 - Production/Stable',
|
39 | 47 | 'Intended Audience :: Developers',
|
|
0 commit comments