File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313env :
1414 CIBW_TEST_COMMAND : python {project}/tests/test.py
15- # This can be removed if pyproject.toml is used
16- CIBW_BEFORE_BUILD : pip install pybind11
1715
1816
1917jobs :
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [
3+ " setuptools>=42" ,
4+ " wheel" ,
5+ " pybind11>=2.6.0" ,
6+ ]
7+
8+ build-backend = " setuptools.build_meta"
Original file line number Diff line number Diff line change 11from setuptools import setup
22
3- # With setup_requires, this runs twice - once without setup_requires, and once
4- # with. The build only happens the second time.
5- try :
6- from pybind11 .setup_helpers import Pybind11Extension , build_ext
7- from pybind11 import get_cmake_dir
8- except ImportError :
9- from setuptools import Extension as Pybind11Extension
10- from setuptools .command .build_ext import build_ext
3+ # Available at setup time due to pyproject.toml
4+ from pybind11 .setup_helpers import Pybind11Extension , build_ext
5+ from pybind11 import get_cmake_dir
116
127import sys
138
3934 description = "A test project using pybind11" ,
4035 long_description = "" ,
4136 ext_modules = ext_modules ,
42- # Note: You have to add pybind11 to both setup and install requires to make
43- # it available during the build. Using PEP 518's pyproject.toml is better!
44- setup_requires = ["pybind11==2.6.0" ],
45- install_requires = ["pybind11==2.6.0" ],
4637 extras_require = {"test" : "pytest" },
4738 # Currently, build_ext only provides an optional "highest supported C++
4839 # level" feature, but in the future it may provide more features.
You can’t perform that action at this time.
0 commit comments