On Wed, Apr 21, 2010 at 10:00 AM, Dag Sverre Seljebotn
<
da...@student.matnat.uio.no> wrote:
> Ondrej Certik wrote:
>>
>> On Wed, Apr 21, 2010 at 6:13 AM, Dag Sverre Seljebotn
>> <
da...@student.matnat.uio.no> wrote:
>>>
>>> Alas, the time has come that I must distribute my software to others. And
>>> I'm realizing that my beloved scons scripts may no longer be up to the
>>> task,
>>> which don't support different Fortran compilers and installation...
>>>
>>> Kurt, you've looked a lot of this for fwrap, but I failed to find a clear
>>> conclusion on the mailing lists... do you have a conclusion now? What
>>> tool
>>> would you pick to build a Cython+Fortran project? Is e.g. numscons
>>> currently
>>> up for the job?
>>
>> I use cmake and I use cython, C and fortran in my project. It
>> generates makefiles that work nicely in parallel (that's very
>> important for me). And it's very robust, I can only recommend.
>
> Some questions:
>
> - How do you/do you need to ensure that Python extension modules are
> correctly linked with Fortran code? Does it automatically switch to using
> fortran as the linker when linking Fortran into the extension modules?
It's using gcc, as that works for me. I didn't know I need to use
gfotran to link it. Why? If that is the requirement, I think it is
possible to make cmake use gfortran.
> - Do you support multiple Fortran compilers or just gfortran?
Cmake supports all kinds of fortran compilers. It's true that I only
use gfortran, but I think any compiler would work.
> - How about multiple BLAS implementations?
cmake discovers blas itself (of course you can do it yourself too), so
I think it works with all blas implementations.
> - How are packages distributed? (.spkg I guess, so that you don't have to
> deal with it?)
Source, spkg or binaries. Maybe I don't understand the question.
>
> The cmake support for compiling Cython modules you showed me earlier is very
> dangerous and non-crossplatform, but I guess it is easy enough to fix with
Well, it does work on Mac, Linux and Windows (cygwin), as I have
tested it, so I think it's actually pretty cross platform.
> some calls to distutils.sysconfig.
Yep.
Ondrej