[Numpy-discussion] f2py and setup.py how can I specify where the .so file goes?

Jose Gomez-Dans jgomezdans at gmail.com
Wed Jul 10 11:50:25 EDT 2013

I am building a package that exposes some Fortran libraries through f2py.
The packages directory looks like this:
  |----------> some.pyf
  |-----------> code.f90

I thoughat that once installed, I'd get the .so and __init__.py in the same
directory (namely ~/.local/lib/python2.7/site-packages/my_pack/). However,
I get

Thet setup file is this at the end, I am clearly missing some option here
to move the *.so into the my_pack directory.... Anybody know which one?



#!/usr/bin/env python

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration(parent_package,top_path)
    config.add_extension('mypack_fortran', ['the_pack/code.f90'] )
    return config

if __name__ == "__main__":
    from numpy.distutils.core import setup
    # Global variables for this extension:
    name         = "mypack_fortran"  # name of the generated python
extension (.so)
    description  = "blah"
    author       = ""
    author_email = ""

    setup( name=name,\
        description=description, \
        author=author, \
        author_email = author_email, \
        configuration = configuration, version="1.0.2",\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130710/894e1b5c/attachment.html>

More information about the NumPy-Discussion mailing list