f2py on windows tutorials
Flavio
fccoelho at gmail.com
Wed Sep 27 14:17:12 EDT 2006
Hi Robert,
Good News,
I tried creating the setup.cfg as you suggested and ran
python setup.py bdist_wininst
and
python setup.py bdist_egg
both of them worked perfectly!!! compiled my Fortran extension, and
packed it up for distribution.
I have since installed and tested and it even works! isn't this great?
thanks for all the help you provided. I couldn't have done it without
it.
Cheers,
Flávio
Robert Kern wrote:
> Flavio wrote:
> > Ok,
> >
> > I tried that and it seems we are making progress
> >
> > so here is my command:
> >
> > python setup.py build_ext --compiler=mingw32 --fcompiler=gnu
> >
> > Now it is complaining about my pyf!!
> >
> > error: unknown file type '.pyf'
> >
> > here is my setup .py:
> >
> > import setuptools, os
> > from numpy.distutils.core import setup, Extension
> >
> > #Configuring Build
> > libs=[];libdirs=[];f2pyopts=[]
> > if os.name == 'nt':
> > f2pyopts.extend(["--compiler=mingw32","--fcompiler=gnu"])
>
> These don't belong here. If you don't want to type them in at the command line,
> put them in a setup.cfg file next to your setup.py:
>
>
> [build_ext]
> compiler=mingw
> fcompiler=gnu
>
>
> (Note: "mingw", not "mingw32"!)
>
> > flib = Extension(name='flib',
> > libraries=libs,
> > library_dirs=libdirs,
> > f2py_options=f2pyopts,
> >
> > sources=['model-builder/Bayes/flib.f','model-builder/Bayes/flib.pyf',]
>
> The .pyf file needs to come first.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
> that is made terrible by our own mad attempt to interpret it as though it had
> an underlying truth."
> -- Umberto Eco
More information about the Python-list
mailing list