@@ -131,13 +131,13 @@ return types into place and for the module initialisation. Although some of
131
131
this is amortised, as the extension grows, the boilerplate required for each
132
132
function(s) remains.
133
133
134
- The standard python build system ``distutils `` supports compiling C-extensions
135
- from a ``setup.py ``, which is rather convenient :
134
+ The standard python build system, ``setuptools ``, supports compiling
135
+ C-extensions via a ``setup.py `` file :
136
136
137
137
.. literalinclude :: python_c_api/setup.py
138
138
:language: python
139
139
140
- This can be compiled :
140
+ The setup file is called as follows :
141
141
142
142
.. sourcecode :: console
143
143
@@ -227,7 +227,7 @@ returns a resulting new array.
227
227
.. literalinclude :: numpy_c_api/cos_module_np.c
228
228
:language: c
229
229
230
- To compile this we can use distutils again. However we need to be sure to
230
+ To compile this we can use `` setuptools `` again. However we need to be sure to
231
231
include the NumPy headers by using :func: `numpy.get_include `.
232
232
233
233
.. literalinclude :: numpy_c_api/setup.py
@@ -361,7 +361,7 @@ The function implementation resides in the following C source file:
361
361
.. literalinclude :: ctypes_numpy/cos_doubles.c
362
362
:language: c
363
363
364
- And since the library is pure C, we can't use ``distutils `` to compile it, but
364
+ And since the library is pure C, we can't use ``setuptools `` to compile it, but
365
365
must use a combination of ``make `` and ``gcc ``:
366
366
367
367
.. literalinclude :: ctypes_numpy/makefile
@@ -464,7 +464,7 @@ Generating the compiled wrappers is a two stage process:
464
464
module.
465
465
466
466
#. Compile the ``cos_module_wrap.c `` into the ``_cos_module.so ``. Luckily,
467
- ``distutils `` knows how to handle SWIG interface files, so that our
467
+ ``setuptools `` knows how to handle SWIG interface files, so that our
468
468
``setup.py `` is simply:
469
469
470
470
.. literalinclude :: swig/setup.py
@@ -576,7 +576,7 @@ file:
576
576
header, There is nothing there that we wish to expose to Python since we
577
577
expose the functionality through ``cos_doubles_func ``.
578
578
579
- And, as before we can use distutils to wrap this:
579
+ And, as before we can use `` setuptools `` to wrap this:
580
580
581
581
.. literalinclude :: swig_numpy/setup.py
582
582
:language: python
@@ -670,8 +670,8 @@ The main Cython code for our ``cos_module`` is contained in the file
670
670
Note the additional keywords such as ``cdef `` and ``extern ``. Also the
671
671
``cos_func `` is then pure Python.
672
672
673
- Again we can use the standard ``distutils `` module, but this time we need some
674
- additional pieces from the ``Cython.Distutils ``:
673
+ Again we can use the standard ``setuptools `` module, but this time we need some
674
+ additional pieces from ``Cython.Build ``:
675
675
676
676
.. literalinclude :: cython/setup.py
677
677
@@ -774,7 +774,7 @@ This is wrapped as ``cos_doubles_func`` using the following Cython code:
774
774
.. literalinclude :: cython_numpy/_cos_doubles.pyx
775
775
:language: cython
776
776
777
- And can be compiled using ``distutils ``:
777
+ And can be compiled using ``setuptools ``:
778
778
779
779
.. literalinclude :: cython_numpy/setup.py
780
780
:language: python
0 commit comments