@@ -4,13 +4,14 @@ Using via `numpy.distutils`
44
55.. currentmodule :: numpy.distutils.core
66
7- :mod: `numpy.distutils ` is part of NumPy extending standard Python `` distutils ``
8- to deal with Fortran sources and F2PY signature files, e.g. compile Fortran
9- sources, call F2PY to construct extension modules, etc.
7+ :mod: `numpy.distutils ` is part of NumPy; and extends the standard Python
8+ `` distutils `` module to deal with Fortran sources and F2PY signature files, e.g.
9+ compile Fortran sources, call F2PY to construct extension modules, etc.
1010
1111.. topic :: Example
1212
13- Consider the following `setup file `__:
13+ Consider the following `setup file `__ for the ``fib `` examples in the previous
14+ section:
1415
1516 .. literalinclude :: ./code/setup_example.py
1617 :language: python
@@ -26,30 +27,32 @@ sources, call F2PY to construct extension modules, etc.
2627
2728 __ setup_example.py
2829
30+ Extensions to ``distutils ``
31+ ===========================
32+
2933:mod: `numpy.distutils ` extends ``distutils `` with the following features:
3034
3135* :class: `Extension ` class argument ``sources `` may contain Fortran source
3236 files. In addition, the list ``sources `` may contain at most one
33- F2PY signature file, and then the name of an Extension module must
34- match with the ``<modulename> `` used in signature file. It is
37+ F2PY signature file; in this case, the name of an Extension module must
38+ match with the ``<modulename> `` used in signature file. It is
3539 assumed that an F2PY signature file contains exactly one ``python
3640 module `` block.
3741
38- If ``sources `` does not contain a signature files, then F2PY is used
39- to scan Fortran source files for routine signatures to construct the
40- wrappers to Fortran codes.
42+ If ``sources `` do not contain a signature file, then F2PY is used to scan
43+ Fortran source files to construct wrappers to the Fortran codes.
4144
42- Additional options to F2PY process can be given using :class: ` Extension `
43- class argument ``f2py_options ``.
45+ Additional options to the F2PY executable can be given using the
46+ :class: ` Extension ` class argument ``f2py_options ``.
4447
4548* The following new ``distutils `` commands are defined:
4649
4750 ``build_src ``
4851 to construct Fortran wrapper extension modules, among many other things.
4952 ``config_fc ``
50- to change Fortran compiler options
53+ to change Fortran compiler options.
5154
52- as well as ``build_ext `` and ``build_clib `` commands are enhanced
55+ as well as ``build_ext `` and ``build_clib `` commands which are also enhanced
5356 to support Fortran sources.
5457
5558 Run
@@ -60,14 +63,14 @@ sources, call F2PY to construct extension modules, etc.
6063
6164 to see available options for these commands.
6265
63- * When building Python packages containing Fortran sources, then one
64- can choose different Fortran compilers by using ``build_ext ``
66+ * When building Python packages containing Fortran sources, one
67+ can choose different Fortran compilers by using the ``build_ext ``
6568 command option ``--fcompiler=<Vendor> ``. Here ``<Vendor> `` can be one of the
6669 following names::
6770
6871 absoft sun mips intel intelv intele intelev nag compaq compaqv gnu vast pg hpux
6972
70- See ``numpy_distutils/fcompiler.py `` for up-to-date list of
73+ See ``numpy_distutils/fcompiler.py `` for an up-to-date list of
7174 supported compilers or run
7275
7376 ::
0 commit comments