[SciPy-dev] eggs and f2py extensions

Pearu Peterson pearu at scipy.org
Mon Jan 16 14:37:10 CST 2006



On Mon, 16 Jan 2006, Robert Kern wrote:

> Christopher Fonnesbeck wrote:
>> On Jan 5, 2006, at 5:24 PM, Robert Kern wrote:
>>
>>> Christopher Fonnesbeck wrote:
>>>
>>>> Are f2py extensions compatible with eggs? At the moment, if I try to
>>>> import setup from setuptools rather than from numpy.distutils, it   does
>>>> not recognize fortran extensions.
>>>
>>> setuptools does interfere with the Fortran extensions to build_ext  a
>>> little bit
>>> if one isn't careful. Everything works fine if you *build* without
>>> setuptools,
>>> and then do the bdist_egg command separately with setuptools.
>>>
>>> E.g.
>>>
>>>   $ python setup.py build
>>>   $ python -c "import setuptools; execfile('setup.py')" bdist_egg
>>
>> I'm trying to take advantage of the automatic prerequisite installing
>> features of setuptools. Do I then have 2 calls: one to  distutils.setup
>> (for building) and another to setuptools.setup (for  prerequisite
>> verification and installing)?
>
> setuptools.setup is distutils.core.setup. However, numpy.distutils.core.setup is
> not distutils.core.setup. Pearu started doing some work to move things out of
> numpy.distutils.core.setup such that numpy.distutils can play well with other
> distutils extensions. Until that happens, I don't see using setuptools'
> extensions to the setup() keywords with numpy.distutils.

numpy.distutils.core.setup should play nicely with all distutils 
extensions. It's an extension of distutils.core.setup, not a replacement.

Could you try out the following code in the header of setup.py:

   from numpy.distutils.core import setup
   import setuptools
   setuptools.setup = setup

? If it works, numpy.distutils could overwrite setuptools.setup 
automatically in numpy/distutils/__init__.py, for instance.

Pearu




More information about the Scipy-dev mailing list