Browse Source

Use new get_include

This also removes the pybind11 dependency in install_requires
as the headers are needed only at setup time.
master
Isuru Fernando 6 years ago committed by Wenzel Jakob
parent
commit
e40692bfd9
  1. 7
      setup.py

7
setup.py

@ -13,12 +13,9 @@ class get_pybind_include(object):
until it is actually installed, so that the ``get_include()`` until it is actually installed, so that the ``get_include()``
method can be invoked. """ method can be invoked. """
def __init__(self, user=False):
self.user = user
def __str__(self): def __str__(self):
import pybind11 import pybind11
return pybind11.get_include(self.user) return pybind11.get_include()
ext_modules = [ ext_modules = [
@ -28,7 +25,6 @@ ext_modules = [
include_dirs=[ include_dirs=[
# Path to pybind11 headers # Path to pybind11 headers
get_pybind_include(), get_pybind_include(),
get_pybind_include(user=True)
], ],
language='c++' language='c++'
), ),
@ -106,7 +102,6 @@ setup(
description='A test project using pybind11', description='A test project using pybind11',
long_description='', long_description='',
ext_modules=ext_modules, ext_modules=ext_modules,
install_requires=['pybind11>=2.4'],
setup_requires=['pybind11>=2.4'], setup_requires=['pybind11>=2.4'],
cmdclass={'build_ext': BuildExt}, cmdclass={'build_ext': BuildExt},
zip_safe=False, zip_safe=False,

Loading…
Cancel
Save