Skip to content

Commit 875d771

Browse files
abravalherimergify[bot]
authored andcommitted
Add remarks to docs on extension modules
1 parent 8ff090a commit 875d771

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/userguide/ext_modules.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Building Extension Modules
33
==========================
44

55
Setuptools can build C/C++ extension modules. The keyword argument
6-
``ext_modules`` of ``setup`` should be a list of instances of the
6+
``ext_modules`` of ``setup()`` should be a list of instances of the
77
:class:`setuptools.Extension` class.
88

99

@@ -48,6 +48,9 @@ To instruct setuptools to compile the ``foo.c`` file into the extension module
4848
You can find more information on the `Python docs about C/C++ extensions`_.
4949
Alternatively, you might also be interested in learn about `Cython`_.
5050

51+
If you plan to distribute a package that uses extensions across multiple
52+
platforms, :pypi:`cibuildwheel` can also be helpful.
53+
5154

5255
Compiler and linker options
5356
===========================
@@ -86,6 +89,17 @@ The linker searches for libraries in the following order:
8689
* first, in directories given by ``-L`` options (in left-to-right order),
8790
* then, in directories given by the environment variable ``LIBRARY_PATH`` (in left-to-right order).
8891

92+
.. important::
93+
All files used to compile your extension need to be available on the system
94+
in the moment setuptools builds your project, so please make sure to include some
95+
documentation on how users can obtain operating system level dependencies
96+
(e.g. compilers and external binary libraries/artifacts).
97+
98+
You will also need to make sure that all auxiliary files that are contained
99+
inside your :term:`project` (e.g. C headers authored by you or your team)
100+
are configured to be included in your :term:`sdist <Source Distribution (or "sdist")>`.
101+
Please have a look on our section on :ref:`Controlling files in the distribution`.
102+
89103

90104
----
91105

0 commit comments

Comments
 (0)