python package using a Fortran library

Michael Wimmer wimmer.mike at gmail.com
Wed Jul 17 02:28:34 PDT 2013


> If you want to use gfortran, you need to use a compiler that has it, like the gcc ports. Add variants allowing the user to choose which one, and default to 4.7:
> 
> https://trac.macports.org/wiki/PortfileRecipes#gcc
> 
> If the build does not respect the compiler choice, that is a bug that should be fixed.
> 

Dear Ryan,

thanks for your answer, I understand that this is how it should be done
in general. However, what I run into is a general problem, as this is a
python setuptools behavior: By default, they always want to use the
compiler that python itself has been compiled with (I assume to avoid
inconsistencies).

There is ways to choose a different compiler using environment flags,
but I had some trouble with that in the past. (for example, setuptools
on the Mac behaves differently in that respect to Linux.)

How do other python ports deal with such a situation (i.e. using the
macports gcc instead of Xcode?)?

Best,

Michael



More information about the macports-users mailing list