Skip to content

Commit 0df11d8

Browse files
authored
docs: update build description slightly (#2794)
* docs: update build description slightly * docs: missing ticks
1 parent 0b3df7f commit 0df11d8

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

docs/compiling.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ for NumPy's parallel compilation distutils tool is included. Use it like this:
8484
8585
The argument is the name of an environment variable to control the number of
8686
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.
9192

9293
If you are developing rapidly and have a lot of C++ files, you may want to
9394
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:
136137
.. code-block:: toml
137138
138139
[build-system]
139-
requires = ["setuptools", "wheel", "pybind11==2.6.0"]
140+
requires = ["setuptools>=42", "wheel", "pybind11~=2.6.1"]
140141
build-backend = "setuptools.build_meta"
141142
142143
.. note::
@@ -147,10 +148,12 @@ Your ``pyproject.toml`` file will likely look something like this:
147148
in Python) using something like `cibuildwheel`_, remember that ``setup.py``
148149
and ``pyproject.toml`` are not even contained in the wheel, so this high
149150
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.
151153

152154
.. _PEP 517: https://www.python.org/dev/peps/pep-0517/
153155
.. _cibuildwheel: https://cibuildwheel.readthedocs.io
156+
.. _pypa-build: https://pypa-build.readthedocs.io/en/latest/
154157

155158
.. _setup_helpers-setup_requires:
156159

@@ -401,13 +404,14 @@ can refer to the same [cmake_example]_ repository for a full sample project
401404
FindPython mode
402405
---------------
403406

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:
407411

408412
.. code-block:: cmake
409413
410-
cmake_minumum_required(VERSION 3.15...3.18)
414+
cmake_minumum_required(VERSION 3.15...3.19)
411415
project(example LANGUAGES CXX)
412416
413417
find_package(Python COMPONENTS Interpreter Development REQUIRED)

0 commit comments

Comments
 (0)