On Fri, Mar 11, 2011 at 3:58 AM, Ondrej Certik <ond...@certik.cz> wrote:
> Hi, > > I spent about an hour googling and didn't figure this out. Here is my > setup.py: > > setup( > name = "libqsnake", > cmdclass = {'build_ext': build_ext}, > version = "0.1", > packages = [ > 'qsnake', > 'qsnake.calculators', > 'qsnake.calculators.tests', > 'qsnake.data', > 'qsnake.mesh2d', > 'qsnake.tests', > ], > package_data = { > 'qsnake.tests': ['phaml_data/domain.*'], > }, > include_dirs=[numpy.get_include()], > ext_modules = [Extension("qsnake.cmesh", [ > "qsnake/cmesh.pyx", > "qsnake/fmesh.f90", > ])], > description = "Qsnake standard library", > license = "BSD", > ) > > You can specify Fortran code, that you don't want to process with f2py, in the libraries list and then use the corresponding library in the extension, for example: setup(... libraries = [('foo', dict(sources=['qsnake/fmesh.f90']))], ext_modules = [Extension("qsnake.cmesh", sources = ["qsnake/cmesh.pyx"], libraries = ['foo'] )], ... ) See also scipy/integrate/setup.py that resolves the same issue but just using the configuration function approach. HTH, Pearu
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion