f2py on windows tutorials

Robert Kern robert.kern at gmail.com
Wed Sep 27 14:38:51 EDT 2006


Flavio wrote:
> 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.

I found out why you were getting the probel with .pyf files before. The 
dependency management between commands is a bit wonky, so in order to use .pyf 
files, you need to run the build_src command explicitly before build_ext (or 
*just* use build or one of the bdist_*).

   python setup.py build_src build_ext --compiler=mingw32 build
   python setup.py build
   python setup.py bdist_egg

-- 
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