diff options
author | Rohit Goswami <rog32@hi.is> | 2022-03-12 22:50:39 +0000 |
---|---|---|
committer | Rohit Goswami <rog32@hi.is> | 2022-03-12 23:27:24 +0000 |
commit | be70a249b5d3683d94117b62458211a788c546b0 (patch) | |
tree | 78139bca581c133ea3c11ff86ed984bd12930148 /doc/source/f2py | |
parent | c5cbb4ca9f1e531e44245bfc3ab564c609b8b804 (diff) | |
download | numpy-be70a249b5d3683d94117b62458211a788c546b0.tar.gz |
DOC: Update documentation and usage
Diffstat (limited to 'doc/source/f2py')
-rw-r--r-- | doc/source/f2py/buildtools/index.rst | 3 | ||||
-rw-r--r-- | doc/source/f2py/buildtools/meson.rst | 5 | ||||
-rw-r--r-- | doc/source/f2py/code/meson.build | 4 | ||||
-rw-r--r-- | doc/source/f2py/code/meson_upd.build | 4 | ||||
-rw-r--r-- | doc/source/f2py/usage.rst | 4 |
5 files changed, 14 insertions, 6 deletions
diff --git a/doc/source/f2py/buildtools/index.rst b/doc/source/f2py/buildtools/index.rst index e7492f191..f5615d336 100644 --- a/doc/source/f2py/buildtools/index.rst +++ b/doc/source/f2py/buildtools/index.rst @@ -80,7 +80,8 @@ Signature files .. note:: - The signature file output situation is being reconsidered in `issue 20385`_ . + To generate every possible input ``--empty-gen`` can be passed to ``f2py`` + from NumPy version ``1.22.4``. In theory keeping the above requirements in hand, any build system can be diff --git a/doc/source/f2py/buildtools/meson.rst b/doc/source/f2py/buildtools/meson.rst index d98752e65..440694d18 100644 --- a/doc/source/f2py/buildtools/meson.rst +++ b/doc/source/f2py/buildtools/meson.rst @@ -83,6 +83,11 @@ A major pain point in the workflow defined above, is the manual tracking of inputs. Although it would require more effort to figure out the actual outputs for reasons discussed in :ref:`f2py-bldsys`. +.. note:: + + To generate every possible input ``--empty-gen`` can be passed to ``f2py`` + from NumPy version ``1.22.4``. + However, we can augment our workflow in a straightforward to take into account files for which the outputs are known when the build system is set up. diff --git a/doc/source/f2py/code/meson.build b/doc/source/f2py/code/meson.build index b756abf8f..00f152cfc 100644 --- a/doc/source/f2py/code/meson.build +++ b/doc/source/f2py/code/meson.build @@ -22,9 +22,9 @@ incdir_f2py = run_command(py3, fibby_source = custom_target('fibbymodule.c', input : ['fib1.f'], - output : ['fibbymodule.c'], + output : ['fibbymodule.c', 'fibby-f2pywrappers.f', 'fibby-f2pywrappers2.f90'], command : [ py3, '-m', 'numpy.f2py', '@INPUT@', - '-m', 'fibby', '--lower' ] + '-m', 'fibby', '--lower', '--empty-gen' ] ) inc_np = include_directories(incdir_numpy, incdir_f2py) diff --git a/doc/source/f2py/code/meson_upd.build b/doc/source/f2py/code/meson_upd.build index 97bd8d175..5b28742a1 100644 --- a/doc/source/f2py/code/meson_upd.build +++ b/doc/source/f2py/code/meson_upd.build @@ -22,9 +22,9 @@ incdir_f2py = run_command(py3, fibby_source = custom_target('fibbymodule.c', input : ['fib1.f'], - output : ['fibbymodule.c'], + output : ['fibbymodule.c', 'fibby-f2pywrappers.f', 'fibby-f2pywrappers2.f90'], command : [ py3, '-m', 'numpy.f2py', '@INPUT@', - '-m', 'fibby', '--lower' ]) + '-m', 'fibby', '--lower', '--empty-gen' ]) inc_np = include_directories(incdir_numpy, incdir_f2py) diff --git a/doc/source/f2py/usage.rst b/doc/source/f2py/usage.rst index 332cc5bce..7541be34b 100644 --- a/doc/source/f2py/usage.rst +++ b/doc/source/f2py/usage.rst @@ -224,6 +224,8 @@ Other options Run quietly. ``--verbose`` Run with extra verbosity. + ``--empty-gen`` + Generate all possible (empty) wrapper files. ``-v`` Print the F2PY version and exit. @@ -289,4 +291,4 @@ packages directory for the version of Python you are using. For the resulting package to work, you need to create a file named ``__init__.py`` (in the same directory as ``add.pyf``). Notice the extension module is defined entirely in terms of the ``add.pyf`` and ``add.f`` files. The -conversion of the .pyf file to a .c file is handled by `numpy.distutils`.
\ No newline at end of file +conversion of the .pyf file to a .c file is handled by `numpy.distutils`. |