[Distutils] Some negative press for easy_install
Robert Kern
robert.kern at gmail.com
Thu Feb 9 20:31:35 CET 2006
Andrew Straw wrote:
> Note that matplotlib tried essentially this for a while, but apparently
> some folks really didn't like it. I'm not sure what exactly broke on
> their systems (they didn't complain to the mailing list), but when
> setup.py reverted to a plain distutils script, they cheered.
That's right, they complained to me, instead. :-)
The issue was that they had setuptools on their system because they were
building eggs for another project, but specifically *didn't* want to install
matplotlib as an egg.
> Matplotlib
> now has setupegg.py:
>
> from setuptools import setup
> execfile('setup.py',
> {'additional_params' :
> {'namespace_packages' : ['matplotlib.toolkits']}})
>
> I guess the point is that just because someone has setuptools installed
> on their system doesn't mean they want to use it.
>
> Another option, for a single setup.py, is something like the following:
>
> if 'setuptools' in sys.modules:
> use_setuptools_options()
>
> This way, setup.py can be setuptools-aware without doing 'import
> setuptools', but the user would have to do:
> python -c "import setuptools; execfile('setup.py')"
And this is my preferred method for those packages that want to provide the
appropriate information for egg builds but not (yet) *require* setuptools or egg
builds. It means that "easy_install somepackage==dev" works (a failing of the
setupegg.py approach) and allows "python setup.py install" to work as standard
distutils does.
--
Robert Kern
robert.kern at gmail.com
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the Distutils-SIG
mailing list