[Numpy-discussion] Fortran 90 Library and .mod files numpy.distutils

Onur Solmaz onursolmaz at gmail.com
Mon May 26 08:48:38 EDT 2014

I am building a Fortran 90 library and its extension. .mod files get
generated inside the build/temp.linux-x86_64-2.7/ directory, and stay
there; so when building the extension, the compiler complains that it
cannot find the modules
This is because the include paths do not have the temp directory. I can
work this around by adding that to the include paths for the extension, but
this is not a clean solution.
What is the best solution to this?

I also want to be able to use the modules later, because I will distribute
the library. It is some other issue whether the modules should be
distributed with the library under /usr/lib or /usr/include, refer to

Also one can refer to
this<https://gcc.gnu.org/ml/fortran/2011-06/msg00117.html>thread. This
is what convinced me to distribute the modules, rather than
putting module definitions into header files, which the user can include in
their code to recreate the modules. Yet another way is to use submodules,
but that feature is not available in Fortran 90.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140526/77624183/attachment.html>

More information about the NumPy-Discussion mailing list