[SciPy-dev] scipy / f2py / debian

eric jones eric at enthought.com
Mon Aug 26 15:39:38 CDT 2002

Hey Skip,

Here is the short thread on the topic.


Paul's point is that distutils inspects the Python makefile to determine
what C compiler/settings to use when building extension modules.  When
it comes to building Fortran based extension modules, there isn't any
place to look for what compiler and flags should be used to build
compatible modules.  Scipy_distutils has taken the approach of trying to
detect the available Fortran compiler on the system.  The flags for each
specific compiler are hard coded to generate Python compatible code.
Pearu had already figured the settings for a lot of compilers in his
f2py makefiles, and use with scipy has further refined them.  The hard
coded flags aren't perfect, but they seem to get the job done in most
cases.  I think they'll eventually work in 95% of the cases and maybe
even 100%.

On the coding side, work is required re-factoring distutils.  There are
multiple places in scipy_distutils where a long function (100 lines or
so) is overridden so that we can change a few lines in the middle.  The
original distutils should get re-factored to solve these issues.  We
might need to add a few keywords also (do we have a keyword for defining
fortran command line options now?)

Also, dependency issues between Fortran files and the resulting .so file
are not calculated correctly because the Fortran files are always
archived to a static library and then included in the link step using a
-l flag.  -l specified libraries are checked for there date in the
dependency check.  There are probably a number of other issues like this
that need to be fixed before it gets to Python standard library quality.

I guess the final issue is that the only group that will use Fortran
support is the scientific community.  The maintainers (unlikely Fortran
geeks) may not want to add a mass of code that they aren't familiar
with.  Our community, of course, is willing to help maintain it, but it
is still an issue.

> -----Original Message-----
> From: scipy-dev-admin at scipy.net [mailto:scipy-dev-admin at scipy.net] On
> Behalf Of Skip Montanaro
> Sent: Monday, August 26, 2002 1:48 PM
> To: scipy-dev at scipy.net
> Subject: RE: [SciPy-dev] scipy / f2py / debian
>     eric> The best solution is actually for scipy_distutils to be
>     eric> into Python's distutils.  That is what I would like to see
> happen,
>     eric> but I don't think its inclusion is extremely.  We broached
>     eric> subject once on the distutils sig, and the only response
>     eric> mine and Pearu's was from Paul Dubois saying it was a bad
> I
>     eric> disagree but don't have the time to push this battle hard.
>     eric> think it would take quite a bit of work (convincing and
> to
>     eric> get it into the core.  If someone wants to champion this
>     eric> I'm all for it.
> Eric,
> Can you recap the discussion for me (off-list if that's more
> I am new to this list but may be able to convince the python-dev
> that
> be that merging your changes into distutils would be worthwhile.
> --
> Skip Montanaro
> skip at pobox.com
> consulting: http://manatee.mojam.com/~skip/resume.html
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev

More information about the Scipy-dev mailing list