Skip to content

Commit 9b9f646

Browse files
committed
Remove narrative references to distutils
1 parent 5878dce commit 9b9f646

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

advanced/interfacing_with_c/interfacing_with_c.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ return types into place and for the module initialisation. Although some of
131131
this is amortised, as the extension grows, the boilerplate required for each
132132
function(s) remains.
133133

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

137137
.. literalinclude:: python_c_api/setup.py
138138
:language: python
139139

140-
This can be compiled:
140+
The setup file is called as follows:
141141

142142
.. sourcecode:: console
143143

@@ -227,7 +227,7 @@ returns a resulting new array.
227227
.. literalinclude:: numpy_c_api/cos_module_np.c
228228
:language: c
229229

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
231231
include the NumPy headers by using :func:`numpy.get_include`.
232232

233233
.. literalinclude:: numpy_c_api/setup.py
@@ -361,7 +361,7 @@ The function implementation resides in the following C source file:
361361
.. literalinclude:: ctypes_numpy/cos_doubles.c
362362
:language: c
363363

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
365365
must use a combination of ``make`` and ``gcc``:
366366

367367
.. literalinclude:: ctypes_numpy/makefile
@@ -464,7 +464,7 @@ Generating the compiled wrappers is a two stage process:
464464
module.
465465

466466
#. 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
468468
``setup.py`` is simply:
469469

470470
.. literalinclude:: swig/setup.py
@@ -576,7 +576,7 @@ file:
576576
header, There is nothing there that we wish to expose to Python since we
577577
expose the functionality through ``cos_doubles_func``.
578578

579-
And, as before we can use distutils to wrap this:
579+
And, as before we can use ``setuptools`` to wrap this:
580580

581581
.. literalinclude:: swig_numpy/setup.py
582582
:language: python
@@ -670,8 +670,8 @@ The main Cython code for our ``cos_module`` is contained in the file
670670
Note the additional keywords such as ``cdef`` and ``extern``. Also the
671671
``cos_func`` is then pure Python.
672672

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``:
675675

676676
.. literalinclude:: cython/setup.py
677677

@@ -774,7 +774,7 @@ This is wrapped as ``cos_doubles_func`` using the following Cython code:
774774
.. literalinclude:: cython_numpy/_cos_doubles.pyx
775775
:language: cython
776776

777-
And can be compiled using ``distutils``:
777+
And can be compiled using ``setuptools``:
778778

779779
.. literalinclude:: cython_numpy/setup.py
780780
:language: python

0 commit comments

Comments
 (0)