summaryrefslogtreecommitdiff
path: root/doc/source/f2py
diff options
context:
space:
mode:
authorRohit Goswami <rog32@hi.is>2022-03-21 11:43:56 +0000
committerRohit Goswami <rog32@hi.is>2022-03-21 11:43:56 +0000
commit4b73c2d37bea45228402330c4aa17390c7e893b6 (patch)
tree495a4e74f173f08eda0f354f96d380c549818b0f /doc/source/f2py
parente96bf13c71ec0dc6d75245352ee414ca3e8253db (diff)
downloadnumpy-4b73c2d37bea45228402330c4aa17390c7e893b6.tar.gz
ENH: Switch to a negative flag
Also remove FutureWarning and update documentation Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
Diffstat (limited to 'doc/source/f2py')
-rw-r--r--doc/source/f2py/buildtools/index.rst6
-rw-r--r--doc/source/f2py/buildtools/meson.rst6
-rw-r--r--doc/source/f2py/code/meson.build2
-rw-r--r--doc/source/f2py/code/meson_upd.build2
-rw-r--r--doc/source/f2py/usage.rst5
5 files changed, 13 insertions, 8 deletions
diff --git a/doc/source/f2py/buildtools/index.rst b/doc/source/f2py/buildtools/index.rst
index 5121c3775..08e0763fe 100644
--- a/doc/source/f2py/buildtools/index.rst
+++ b/doc/source/f2py/buildtools/index.rst
@@ -80,8 +80,10 @@ Signature files
.. note::
- To generate every possible input for a given standard (F77 or F90)
- ``--empty-gen`` can be passed to ``f2py`` from NumPy version ``1.22.4``.
+ From NumPy ``1.22.4`` onwards, ``f2py`` will deterministically generate
+ wrapper files based on the input file Fortran standard (F77 or greater).
+ ``--no-empty-gen`` can be passed to ``f2py`` to restore the previous
+ behaviour of only generating wrappers when needed by the input .
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 2c5a2395c..59a96ab45 100644
--- a/doc/source/f2py/buildtools/meson.rst
+++ b/doc/source/f2py/buildtools/meson.rst
@@ -85,8 +85,10 @@ for reasons discussed in :ref:`f2py-bldsys`.
.. note::
- To generate every possible input for a given standard (F77 or F90)
- ``--empty-gen`` can be passed to ``f2py`` from NumPy version ``1.22.4``.
+ From NumPy ``1.22.4`` onwards, ``f2py`` will deterministically generate
+ wrapper files based on the input file Fortran standard (F77 or greater).
+ ``--no-empty-gen`` can be passed to ``f2py`` to restore the previous
+ behaviour of only generating wrappers when needed by the input .
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 36c841fd3..b84bf52a9 100644
--- a/doc/source/f2py/code/meson.build
+++ b/doc/source/f2py/code/meson.build
@@ -24,7 +24,7 @@ fibby_source = custom_target('fibbymodule.c',
input : ['fib1.f'], # .f so no F90 wrappers
output : ['fibbymodule.c', 'fibby-f2pywrappers.f'],
command : [ py3, '-m', 'numpy.f2py', '@INPUT@',
- '-m', 'fibby', '--lower', '--empty-gen' ]
+ '-m', 'fibby', '--lower']
)
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 a2b2badea..44d69d182 100644
--- a/doc/source/f2py/code/meson_upd.build
+++ b/doc/source/f2py/code/meson_upd.build
@@ -24,7 +24,7 @@ fibby_source = custom_target('fibbymodule.c',
input : ['fib1.f'], # .f so no F90 wrappers
output : ['fibbymodule.c', 'fibby-f2pywrappers.f'],
command : [ py3, '-m', 'numpy.f2py', '@INPUT@',
- '-m', 'fibby', '--lower', '--empty-gen' ])
+ '-m', 'fibby', '--lower'])
inc_np = include_directories(incdir_numpy, incdir_f2py)
diff --git a/doc/source/f2py/usage.rst b/doc/source/f2py/usage.rst
index 7541be34b..d3e9db22a 100644
--- a/doc/source/f2py/usage.rst
+++ b/doc/source/f2py/usage.rst
@@ -224,8 +224,9 @@ Other options
Run quietly.
``--verbose``
Run with extra verbosity.
- ``--empty-gen``
- Generate all possible (empty) wrapper files.
+ ``--no-empty-gen``
+ Do not generate wrapper files unless required by the inputs.
+ This is a backwards compatibility flag to restore pre 1.22.4 behavior.
``-v``
Print the F2PY version and exit.