[Numpy-discussion] Setuptools leftover junk

David M. Cooke cookedm at physics.mcmaster.ca
Wed Jun 28 14:10:40 CDT 2006


On Wed, 28 Jun 2006 13:32:15 -0500
Robert Kern <robert.kern at gmail.com> wrote:

> Fernando Perez wrote:
> 
> > Is it really necessary to have all that setuptools junk left around,
> > for those of us who aren't asking for it explicitly?  My personal
> > opinions on setuptools aside, I think it's just a sane practice not to
> > create this kind of extra baggage unless explicitly requested.
> > 
> > I scoured my home directory for any .file which might be triggering
> > this inadvertedly, but I can't seem to find any, so I'm going to guess
> > this is somehow being caused by numpy's own setup.  If it's my own
> > mistake, I'll be happy to be shown how to coexist peacefully with
> > setuptools.
> > 
> > Since this also affects user code (I think via f2py or something
> > internal to numpy, since all I'm calling is f2py in my code), I really
> > think it would be nice to clean it.
> 
> numpy.distutils uses setuptools if it is importable in order to make sure
> that the two don't stomp on each other. It's probable that that test could
> probably be done with Andrew Straw's method:
> 
>    if 'setuptools' in sys.modules:
>      have_setuptools = True
>      from setuptools import setup as old_setup
>    else:
>      have_setuptools = False
>      from distutils.core import setup as old_setup
> 
> Tested patches welcome.

Done. I've also added a 'setupegg.py' module that wraps running 'setup.py'
with an import of setuptools (it's based on the one used in matplotlib).

easy_install still works, also.

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca




More information about the Numpy-discussion mailing list