[SciPy-dev] scipy / f2py / debian

Skip Montanaro skip at pobox.com
Tue Aug 27 09:03:36 CDT 2002

    eric> Here is the short thread on the topic.

    eric> http://aspn.activestate.com/ASPN/Mail/Message/751769

    eric> Paul's point is that distutils inspects the Python makefile to
    eric> determine what C compiler/settings to use when building extension
    eric> modules....


Thanks for refreshing me on the details of the conversation we had about
this last week.  I read through this thread and the two referenced threads.
I think Paul's original worry that distutils discovers C compiler info from
Makefiles is a bit of a red herring.  That's where it happens to be, and I
guess for Fortran that's not the case.  In my opinion distutils should be
flexible in this regard.  (The reason to look in Makefiles for this
information is probably because that's where the configure script puts it.
If configure could sniff out some Fortran information and stuff it in
Makefiles, you could do the same with Fortran.  But who wants to mess with
configure? In most peoples' minds I suspect that's worse than messing with
Texas.  ;-)

I suggest incorporation of distutils support for Fortran be tackled in two,
perhaps three, steps:

    1. Refactor the scipy_distutils code the way you want it to avoid the
       100-line cut-n-paste problem.  Submit a patch to SF for this.
       Identify Fortran and f2py support as your target use case and try to
       give some ballpark figures for the effect the refactoring will have
       on adding this support (e.g., reductions in modified or duplicated
       lines of code).

    2. Submit a patch for Fortran support which relies on the refactoring

    3. [Optional?] Add support for user-specified compiler flags.  This may
       simply be a set of environment variables similar to Make's gazillion
       compile and link flags.  If users are going to want to fiddle with
       optimization flags, this seems like the most reasonable approach

I don't know how in-sync scipy_distutils is with CVS distutils, but I'd be
happy to try and help sync things up.


More information about the Scipy-dev mailing list