summaryrefslogtreecommitdiff
path: root/doc/source/f2py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/f2py')
-rw-r--r--doc/source/f2py/buildtools/cmake.rst2
-rw-r--r--doc/source/f2py/buildtools/meson.rst6
-rw-r--r--doc/source/f2py/code/ftype.f2
-rw-r--r--doc/source/f2py/f2py.getting-started.rst8
-rw-r--r--doc/source/f2py/windows/index.rst2
-rw-r--r--doc/source/f2py/windows/pgi.rst2
6 files changed, 14 insertions, 8 deletions
diff --git a/doc/source/f2py/buildtools/cmake.rst b/doc/source/f2py/buildtools/cmake.rst
index 8c654c73e..db64453b4 100644
--- a/doc/source/f2py/buildtools/cmake.rst
+++ b/doc/source/f2py/buildtools/cmake.rst
@@ -18,7 +18,7 @@ but this `extensive CMake collection`_ of resources is great.
``f2py`` is not particularly native or pleasant; and a more natural approach
is to consider :ref:`f2py-skbuild`
-Fibonacci Walkthrough (F77)
+Fibonacci walkthrough (F77)
===========================
Returning to the ``fib`` example from :ref:`f2py-getting-started` section.
diff --git a/doc/source/f2py/buildtools/meson.rst b/doc/source/f2py/buildtools/meson.rst
index 6b4392880..23b454ee5 100644
--- a/doc/source/f2py/buildtools/meson.rst
+++ b/doc/source/f2py/buildtools/meson.rst
@@ -23,7 +23,7 @@ build system like ``meson``. We will acquire this by:
.. code-block:: bash
- python -n numpy.f2py fib1.f -m fib2
+ python -m numpy.f2py fib1.f -m fib2
Now, consider the following ``meson.build`` file for the ``fib`` and ``scalar``
examples from :ref:`f2py-getting-started` section:
@@ -57,7 +57,7 @@ to lowercase the original Fortran file with say:
.. code-block:: bash
tr "[:upper:]" "[:lower:]" < fib1.f > fib1.f
- python -n numpy.f2py fib1.f -m fib2
+ python -m numpy.f2py fib1.f -m fib2
meson --wipe builddir
meson compile -C builddir
cd builddir
@@ -68,7 +68,7 @@ possible. The easiest way to solve this is to let ``f2py`` deal with it:
.. code-block:: bash
- python -n numpy.f2py fib1.f -m fib2 --lower
+ python -m numpy.f2py fib1.f -m fib2 --lower
meson --wipe builddir
meson compile -C builddir
cd builddir
diff --git a/doc/source/f2py/code/ftype.f b/doc/source/f2py/code/ftype.f
index cabbb9e2d..67d5a224b 100644
--- a/doc/source/f2py/code/ftype.f
+++ b/doc/source/f2py/code/ftype.f
@@ -4,6 +4,6 @@ C FILE: FTYPE.F
Cf2py integer optional,intent(in) :: n = 13
REAL A,X
COMMON /DATA/ A,X(3)
- PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]"
+C PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]"
END
C END OF FTYPE.F
diff --git a/doc/source/f2py/f2py.getting-started.rst b/doc/source/f2py/f2py.getting-started.rst
index da88b46f5..e96564814 100644
--- a/doc/source/f2py/f2py.getting-started.rst
+++ b/doc/source/f2py/f2py.getting-started.rst
@@ -18,6 +18,7 @@ following steps:
* F2PY reads a signature file and writes a Python C/API module containing
Fortran/C/Python bindings.
+
* F2PY compiles all sources and builds an extension module containing
the wrappers.
@@ -26,6 +27,13 @@ following steps:
Fortran, SGI MIPSpro, Absoft, NAG, Compaq etc. For different build systems,
see :ref:`f2py-bldsys`.
+ * Depending on your operating system, you may need to install the Python
+ development headers (which provide the file ``Python.h``) separately. In
+ Linux Debian-based distributions this package should be called ``python3-dev``,
+ in Fedora-based distributions it is ``python3-devel``. For macOS, depending
+ how Python was installed, your mileage may vary. In Windows, the headers are
+ typically installed already.
+
Depending on the situation, these steps can be carried out in a single composite
command or step-by-step; in which case some steps can be omitted or combined
with others.
diff --git a/doc/source/f2py/windows/index.rst b/doc/source/f2py/windows/index.rst
index c1e6b4128..980346667 100644
--- a/doc/source/f2py/windows/index.rst
+++ b/doc/source/f2py/windows/index.rst
@@ -56,7 +56,7 @@ PGI Compilers (commercial)
Windows support`_.
Cygwin (FOSS)
- Can also be used for ``gfortran``. Howeve, the POSIX API compatibility layer provided by
+ Can also be used for ``gfortran``. However, the POSIX API compatibility layer provided by
Cygwin is meant to compile UNIX software on Windows, instead of building
native Windows programs. This means cross compilation is required.
diff --git a/doc/source/f2py/windows/pgi.rst b/doc/source/f2py/windows/pgi.rst
index 644259abe..28e25f016 100644
--- a/doc/source/f2py/windows/pgi.rst
+++ b/doc/source/f2py/windows/pgi.rst
@@ -22,7 +22,5 @@ as classic Flang requires a custom LLVM and compilation from sources.
As of 29-01-2022, `PGI compiler toolchains`_ have been superseded by the Nvidia
HPC SDK, with no `native Windows support`_.
-However,
-
.. _PGI compiler toolchains: https://www.pgroup.com/index.html
.. _native Windows support: https://developer.nvidia.com/nvidia-hpc-sdk-downloads#collapseFour