Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
0df11d85
Unverified
Commit
0df11d85
authored
Jan 16, 2021
by
Henry Schreiner
Committed by
GitHub
Jan 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update build description slightly (#2794)
* docs: update build description slightly * docs: missing ticks
parent
0b3df7f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
docs/compiling.rst
+14
-10
No files found.
docs/compiling.rst
View file @
0df11d85
...
@@ -84,10 +84,11 @@ for NumPy's parallel compilation distutils tool is included. Use it like this:
...
@@ -84,10 +84,11 @@ for NumPy's parallel compilation distutils tool is included. Use it like this:
The argument is the name of an environment variable to control the number of
The argument is the name of an environment variable to control the number of
threads, such as ``NPY_NUM_BUILD_JOBS`` (as used by NumPy), though you can set
threads, such as ``NPY_NUM_BUILD_JOBS`` (as used by NumPy), though you can set
something different if you want. You can also pass ``default=N`` to set the
something different if you want; ``CMAKE_BUILD_PARALLEL_LEVEL`` is another choice
default number of threads (0 will take the number of threads available) and
a user might expect. You can also pass ``default=N`` to set the default number
``max=N``, the maximum number of threads; if you have a large extension you may
of threads (0 will take the number of threads available) and ``max=N``, the
want set this to a memory dependent number.
maximum number of threads; if you have a large extension you may want set this
to a memory dependent number.
If you are developing rapidly and have a lot of C++ files, you may want to
If you are developing rapidly and have a lot of C++ files, you may want to
avoid rebuilding files that have not changed. For simple cases were you are
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,7 +137,7 @@ Your ``pyproject.toml`` file will likely look something like this:
.. code-block:: toml
.. code-block:: toml
[build-system]
[build-system]
requires = ["setuptools
", "wheel", "pybind11==2.6.0
"]
requires = ["setuptools
>=42", "wheel", "pybind11~=2.6.1
"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"
.. note::
.. note::
...
@@ -147,10 +148,12 @@ Your ``pyproject.toml`` file will likely look something like this:
...
@@ -147,10 +148,12 @@ Your ``pyproject.toml`` file will likely look something like this:
in Python) using something like `cibuildwheel`_, remember that ``setup.py``
in Python) using something like `cibuildwheel`_, remember that ``setup.py``
and ``pyproject.toml`` are not even contained in the wheel, so this high
and ``pyproject.toml`` are not even contained in the wheel, so this high
Pip requirement is only for source builds, and will not affect users of
Pip requirement is only for source builds, and will not affect users of
your binary wheels.
your binary wheels. If you are building SDists and wheels, then
`pypa-build`_ is the recommended offical tool.
.. _PEP 517: https://www.python.org/dev/peps/pep-0517/
.. _PEP 517: https://www.python.org/dev/peps/pep-0517/
.. _cibuildwheel: https://cibuildwheel.readthedocs.io
.. _cibuildwheel: https://cibuildwheel.readthedocs.io
.. _pypa-build: https://pypa-build.readthedocs.io/en/latest/
.. _setup_helpers-setup_requires:
.. _setup_helpers-setup_requires:
...
@@ -401,13 +404,14 @@ can refer to the same [cmake_example]_ repository for a full sample project
...
@@ -401,13 +404,14 @@ can refer to the same [cmake_example]_ repository for a full sample project
FindPython mode
FindPython mode
---------------
---------------
CMake 3.12+ (3.15+ recommended) added a new module called FindPython that had a
CMake 3.12+ (3.15+ recommended, 3.18.2+ ideal) added a new module called
highly improved search algorithm and modern targets and tools. If you use
FindPython that had a highly improved search algorithm and modern targets
FindPython, pybind11 will detect this and use the existing targets instead:
and tools. If you use FindPython, pybind11 will detect this and use the
existing targets instead:
.. code-block:: cmake
.. code-block:: cmake
cmake_minumum_required(VERSION 3.15...3.1
8
)
cmake_minumum_required(VERSION 3.15...3.1
9
)
project(example LANGUAGES CXX)
project(example LANGUAGES CXX)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment