diff options
author | Rohit Goswami <rog32@hi.is> | 2021-11-15 00:45:32 +0000 |
---|---|---|
committer | Rohit Goswami <rog32@hi.is> | 2021-11-15 03:49:21 +0000 |
commit | 9cd489299d8aba3de23ed478c34e38334115de1a (patch) | |
tree | df45134a41e8f8df2be8d6deafb02a9fc133d892 | |
parent | f203200d8d449d8c6708daa908e04cce62569f1f (diff) | |
download | numpy-9cd489299d8aba3de23ed478c34e38334115de1a.tar.gz |
DOC: Add signature file build information
-rw-r--r-- | doc/source/f2py/buildtools/cmake.rst | 4 | ||||
-rw-r--r-- | doc/source/f2py/buildtools/index.rst | 21 | ||||
-rw-r--r-- | doc/source/f2py/buildtools/meson.rst | 4 | ||||
-rw-r--r-- | doc/source/f2py/buildtools/skbuild.rst | 4 |
4 files changed, 22 insertions, 11 deletions
diff --git a/doc/source/f2py/buildtools/cmake.rst b/doc/source/f2py/buildtools/cmake.rst index fbac926f0..f7c69a8bb 100644 --- a/doc/source/f2py/buildtools/cmake.rst +++ b/doc/source/f2py/buildtools/cmake.rst @@ -18,8 +18,8 @@ but the `official CMake Tutorials`_ are a fantastic resource. ``f2py`` is not particularly native or pleasant; and a more natural approach is to consider :ref:`f2py-skbuild` -Fibonacci Walkthrough -======================= +Fibonacci Walkthrough (F77) +=========================== Returning to the ``fib`` example from :ref:`f2py-getting-started` section. diff --git a/doc/source/f2py/buildtools/index.rst b/doc/source/f2py/buildtools/index.rst index de8ea9212..e6b7fc975 100644 --- a/doc/source/f2py/buildtools/index.rst +++ b/doc/source/f2py/buildtools/index.rst @@ -37,7 +37,7 @@ Building an extension module which includes Python and Fortran consists of: - Python libraries and development headers -Broadly speaking there are two cases which arise when considering the outputs of ``f2py``: +Broadly speaking there are three cases which arise when considering the outputs of ``f2py``: Fortran 77 programs - Input file ``blah.f`` @@ -48,15 +48,30 @@ Fortran 77 programs Fortran 90 programs - Input file ``blah.f`` - Generates: + + ``blahmodule.c`` + ``blah-f2pywrappers2.f90`` The secondary wrapper is used to handle code which is subdivided into modules. +Signature files + - Input file ``blah.pyf`` + - Generates: + + + ``blahmodule.c`` + + ``blah-f2pywrappers2.f90`` (occasionally) + + 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. + + In theory keeping the above requirements in hand, any build system can be adapted to generate ``f2py`` extension modules. Here we will cover a subset of the more popular systems. +.. note:: + ``make`` has no place in a modern multi-language setup, and so is not + discussed further. + Build Systems ============== @@ -67,7 +82,3 @@ Build Systems meson cmake skbuild - -.. note:: - ``make`` has no place in a modern multi-language setup, and so is not - discussed further. diff --git a/doc/source/f2py/buildtools/meson.rst b/doc/source/f2py/buildtools/meson.rst index 9f1ac836e..ad9fa65d7 100644 --- a/doc/source/f2py/buildtools/meson.rst +++ b/doc/source/f2py/buildtools/meson.rst @@ -14,8 +14,8 @@ comfortable and amenable to extension for ``python`` users. Meson needs to be at-least ``0.46.0`` in order to resolve the ``python`` include directories. -Fibonacci Walkthrough -======================= +Fibonacci Walkthrough (F77) +=========================== We will need the generated ``C`` wrapper before we can use a general purpose diff --git a/doc/source/f2py/buildtools/skbuild.rst b/doc/source/f2py/buildtools/skbuild.rst index 961408c42..59fe2f822 100644 --- a/doc/source/f2py/buildtools/skbuild.rst +++ b/doc/source/f2py/buildtools/skbuild.rst @@ -19,8 +19,8 @@ For situations where no ``setuptools`` replacements are required or wanted (i.e. if ``wheels`` are not needed), it is recommended to instead use the vanilla ``cmake`` setup described in :ref:`f2py-cmake`. -Fibonacci Walkthrough -======================= +Fibonacci Walkthrough (F77) +=========================== We will consider the ``fib`` example from :ref:`f2py-getting-started` section. |