[f2py] Re: f2py-users Digest, Vol 9, Issue 1

pearu at cens.ioc.ee pearu at cens.ioc.ee
Mon Oct 3 20:31:38 EEST 2005


On Mon, 3 Oct 2005, Chris Fonnesbeck wrote:

> Thanks Pearu,
> 
> How about in the context of a setup.py file, where extensions are
> specified? For example, mine is:
> 
> #!/usr/bin/env python
> from scipy_distutils.core import setup,Extension
> 
> flib = Extension(name='PyMC.flib',sources=['PyMC/flib.f'])
> version = "0.9.2"
> 
> setup(
> 	version=version,
> 	author="Chris Fonnesbeck",
> 	author_email="fonnesbeck at mac.com",
> 	description="Version %s of PyMC" % version,
> 	license="GNU GPL",
> 	name="PyMC",
> 	url="pymc.sourceforge.net",
> 	packages=["PyMC"],
> 	ext_modules = [flib]	
> )
> 
> Is there an argument for "setup" to include such command-line
> arguments for f2py?

Hmm, using

  lib = Extension(name='PyMC.flib',sources=['PyMC/flib.f'],
                  f2py_options = ['-DNUMARRAY'],
                  define_macros = ['NUMARRAY']
                  )

should work.

Pearu




More information about the f2py-users mailing list