Skip to content

Commit 9cd4892

Browse files
committed
DOC: Add signature file build information
1 parent f203200 commit 9cd4892

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

doc/source/f2py/buildtools/cmake.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ but the `official CMake Tutorials`_ are a fantastic resource.
1818
``f2py`` is not particularly native or pleasant; and a more natural approach
1919
is to consider :ref:`f2py-skbuild`
2020

21-
Fibonacci Walkthrough
22-
=======================
21+
Fibonacci Walkthrough (F77)
22+
===========================
2323

2424
Returning to the ``fib`` example from :ref:`f2py-getting-started` section.
2525

doc/source/f2py/buildtools/index.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Building an extension module which includes Python and Fortran consists of:
3737

3838
- Python libraries and development headers
3939

40-
Broadly speaking there are two cases which arise when considering the outputs of ``f2py``:
40+
Broadly speaking there are three cases which arise when considering the outputs of ``f2py``:
4141

4242
Fortran 77 programs
4343
- Input file ``blah.f``
@@ -48,15 +48,30 @@ Fortran 77 programs
4848
Fortran 90 programs
4949
- Input file ``blah.f``
5050
- Generates:
51+
5152
+ ``blahmodule.c``
5253
+ ``blah-f2pywrappers2.f90``
5354

5455
The secondary wrapper is used to handle code which is subdivided into modules.
5556

57+
Signature files
58+
- Input file ``blah.pyf``
59+
- Generates:
60+
61+
+ ``blahmodule.c``
62+
+ ``blah-f2pywrappers2.f90`` (occasionally)
63+
64+
Signature files ``.pyf`` do not signal their language standard via the file extension, they may generate the module wrapper depending on their contents; which shifts the burden of checking for generated files onto the build system.
65+
66+
5667
In theory keeping the above requirements in hand, any build system can be
5768
adapted to generate ``f2py`` extension modules. Here we will cover a subset of
5869
the more popular systems.
5970

71+
.. note::
72+
``make`` has no place in a modern multi-language setup, and so is not
73+
discussed further.
74+
6075
Build Systems
6176
==============
6277

@@ -67,7 +82,3 @@ Build Systems
6782
meson
6883
cmake
6984
skbuild
70-
71-
.. note::
72-
``make`` has no place in a modern multi-language setup, and so is not
73-
discussed further.

doc/source/f2py/buildtools/meson.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ comfortable and amenable to extension for ``python`` users.
1414
Meson needs to be at-least ``0.46.0`` in order to resolve the ``python`` include directories.
1515

1616

17-
Fibonacci Walkthrough
18-
=======================
17+
Fibonacci Walkthrough (F77)
18+
===========================
1919

2020

2121
We will need the generated ``C`` wrapper before we can use a general purpose

doc/source/f2py/buildtools/skbuild.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ For situations where no ``setuptools`` replacements are required or wanted (i.e.
1919
if ``wheels`` are not needed), it is recommended to instead use the vanilla
2020
``cmake`` setup described in :ref:`f2py-cmake`.
2121

22-
Fibonacci Walkthrough
23-
=======================
22+
Fibonacci Walkthrough (F77)
23+
===========================
2424

2525
We will consider the ``fib`` example from :ref:`f2py-getting-started` section.
2626

0 commit comments

Comments
 (0)