[Distutils] f2py and setuptools
David M. Cooke
cookedm at physics.mcmaster.ca
Thu Jul 6 20:56:57 CEST 2006
On Thu, 06 Jul 2006 15:53:39 -0300
Flavio Codeco Coelho <fccoelho at gmail.com> wrote:
> David M. Cooke wrote:
> > Flavio Codeco Coelho <fccoelho at gmail.com> writes:
> >
> >
> >
> > numpy.distutils interoperates (mostly) ok with setuptools. Just do
> > 'import setuptools' before 'import numpy.distutils'.
> >
> > Although, if you run into problems, please report them to the numpy
> > list (numpy-discussion at lists.sourceforge.net) and we'll see what we
> > can do.
> >
> >
> Actually I would have to do this:
>
> from setuptoos import setup
> from numpy.distutils.core import setup, Extension
>
> Will this work? i.e. is the setup class from setuptools equivalent to
> the setup class from Numpy?
Yes; if numpy finds that setuptools has already been imported [1], you can
use the numpy.distutils.setup and numpy.distutils.Extension. You don't need
to import setup from setuptools; this should be enough:
import setuptools
from numpy.distutils.core import setup, Extension
[1] this is the behaviour in the current svn version. Previous versions would
try to import setuptools, and use it if it succeeded.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca
More information about the Distutils-SIG
mailing list