@@ -84,10 +84,11 @@ for NumPy's parallel compilation distutils tool is included. Use it like this:
84
84
85
85
The argument is the name of an environment variable to control the number of
86
86
threads, such as ``NPY_NUM_BUILD_JOBS `` (as used by NumPy), though you can set
87
- something different if you want. You can also pass ``default=N `` to set the
88
- default number of threads (0 will take the number of threads available) and
89
- ``max=N ``, the maximum number of threads; if you have a large extension you may
90
- want set this to a memory dependent number.
87
+ something different if you want; ``CMAKE_BUILD_PARALLEL_LEVEL `` is another choice
88
+ a user might expect. You can also pass ``default=N `` to set the default number
89
+ of threads (0 will take the number of threads available) and ``max=N ``, the
90
+ maximum number of threads; if you have a large extension you may want set this
91
+ to a memory dependent number.
91
92
92
93
If you are developing rapidly and have a lot of C++ files, you may want to
93
94
avoid rebuilding files that have not changed. For simple cases were you are
@@ -136,7 +137,7 @@ Your ``pyproject.toml`` file will likely look something like this:
136
137
.. code-block :: toml
137
138
138
139
[build-system]
139
- requires = ["setuptools", "wheel", "pybind11== 2.6.0 "]
140
+ requires = ["setuptools>=42 ", "wheel", "pybind11~= 2.6.1 "]
140
141
build-backend = "setuptools.build_meta"
141
142
142
143
.. note ::
@@ -147,10 +148,12 @@ Your ``pyproject.toml`` file will likely look something like this:
147
148
in Python) using something like `cibuildwheel `_, remember that ``setup.py ``
148
149
and ``pyproject.toml `` are not even contained in the wheel, so this high
149
150
Pip requirement is only for source builds, and will not affect users of
150
- your binary wheels.
151
+ your binary wheels. If you are building SDists and wheels, then
152
+ `pypa-build `_ is the recommended offical tool.
151
153
152
154
.. _PEP 517 : https://www.python.org/dev/peps/pep-0517/
153
155
.. _cibuildwheel : https://cibuildwheel.readthedocs.io
156
+ .. _pypa-build : https://pypa-build.readthedocs.io/en/latest/
154
157
155
158
.. _setup_helpers-setup_requires :
156
159
@@ -401,13 +404,14 @@ can refer to the same [cmake_example]_ repository for a full sample project
401
404
FindPython mode
402
405
---------------
403
406
404
- CMake 3.12+ (3.15+ recommended) added a new module called FindPython that had a
405
- highly improved search algorithm and modern targets and tools. If you use
406
- FindPython, pybind11 will detect this and use the existing targets instead:
407
+ CMake 3.12+ (3.15+ recommended, 3.18.2+ ideal) added a new module called
408
+ FindPython that had a highly improved search algorithm and modern targets
409
+ and tools. If you use FindPython, pybind11 will detect this and use the
410
+ existing targets instead:
407
411
408
412
.. code-block :: cmake
409
413
410
- cmake_minumum_required(VERSION 3.15...3.18 )
414
+ cmake_minumum_required(VERSION 3.15...3.19 )
411
415
project(example LANGUAGES CXX)
412
416
413
417
find_package(Python COMPONENTS Interpreter Development REQUIRED)
0 commit comments