[SciPy-dev] numpy.distuils question

Charles Doutriaux doutriaux1@llnl....
Fri Sep 5 12:02:27 CDT 2008


Uwe,

I'm attaching an example of setup.py i have that does what you want.

I have the strucutre:
setup.py
  Lib/
    __init__.py
    ...python files ....
  Src/
     ..fortran or C files ...

Hope this helps.
C.

Note that I also have a .pyf file just to make the i/o to f2py a bit 
cleaner but it is not necessary

C.

Uwe Schmitt wrote:
> Hi,
>
> Thanks to the document team I managed to write a setup.py file which
> builds an extension module with f2py.
> My problem is to install further Python files.
>
> My directory looks like this:
>
>     setup.py
>     module.pyf
>     module.f
>     my_new_package/
>         __init__.py
>         modulewrapper.py
>
>
> the modulewrapper loads module.pyd.
>
> setup.py looks like this:
>
>     def configuration(parent_package='',top_path=None):
>         from numpy.distutils.misc_util import Configuration
>         config = Configuration('my_new_package',parent_package,top_path)
>
>         config.add_extension('module',
>                              sources = ['module.pyf', 'module.f']
>                  )
>
>         return config
>
>     if __name__ == "__main__":
>         from numpy.distutils.core import setup
>         setup(**configuration(top_path='').todict())
>
>
>
> How do I have to change/extend setup.py ?
>
> Greetings, Uwe
> -- 
> Dr. rer. nat. Uwe Schmitt
> F&E Mathematik
>  
> mineway GmbH
> Science Park 2
> D-66123 Saarbrücken
>  
> Telefon: +49 (0)681 8390 5334
> Telefax: +49 (0)681 830 4376
>  
> uschmitt@mineway.de
> www.mineway.de
>  
> Geschäftsführung: Dr.-Ing. Mathias Bauer
> Amtsgericht Saarbrücken HRB 12339
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http:// projects.scipy.org/mailman/listinfo/scipy-dev
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup.py
Type: text/x-python
Size: 926 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20080905/64ef3a2f/attachment.py 


More information about the Scipy-dev mailing list