File tree Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 12
12
13
13
env :
14
14
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
17
15
18
16
19
17
jobs :
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 1
1
from setuptools import setup
2
2
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
11
6
12
7
import sys
13
8
39
34
description = "A test project using pybind11" ,
40
35
long_description = "" ,
41
36
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" ],
46
37
extras_require = {"test" : "pytest" },
47
38
# Currently, build_ext only provides an optional "highest supported C++
48
39
# level" feature, but in the future it may provide more features.
You can’t perform that action at this time.
0 commit comments