@@ -3,7 +3,7 @@ Building Extension Modules
3
3
==========================
4
4
5
5
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
7
7
:class: `setuptools.Extension ` class.
8
8
9
9
@@ -48,6 +48,9 @@ To instruct setuptools to compile the ``foo.c`` file into the extension module
48
48
You can find more information on the `Python docs about C/C++ extensions `_.
49
49
Alternatively, you might also be interested in learn about `Cython `_.
50
50
51
+ If you plan to distribute a package that uses extensions across multiple
52
+ platforms, :pypi: `cibuildwheel ` can also be helpful.
53
+
51
54
52
55
Compiler and linker options
53
56
===========================
@@ -86,6 +89,17 @@ The linker searches for libraries in the following order:
86
89
* first, in directories given by ``-L `` options (in left-to-right order),
87
90
* then, in directories given by the environment variable ``LIBRARY_PATH `` (in left-to-right order).
88
91
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
+
89
103
90
104
----
91
105
0 commit comments