[Distutils] [Python-Dev] At least one package management tool for 2.7
Ian Bicking
ianb at colorstudy.com
Wed Mar 24 18:19:27 CET 2010
On Wed, Mar 24, 2010 at 7:27 AM, Olemis Lang <olemis at gmail.com> wrote:
> My experience is that only `install_requires` is needed (unless you
> want to create app bundles AFAICR) , but in practice I've noticed that
> *some* easy_installable packages are not pip-able (though I had no
> time to figure out why :-/ )
Usually this is because Setuptools is poking at objects to do its
work, while pip tries to work mostly with subprocesses. Though to
complicate things a bit, pip makes sure the Setuptools monkeypatches
to distutils are applied, so that it's always as though the setup.py
says "from setuptools import setup". easy_install *also* does this.
But then easy_install starts calling methods and whatnot, while pip just does:
setup.py install --single-version-externally-managed --no-deps
--record some_tmp_file
The --no-deps keeps Setuptools from resolving dependencies (because it
does so using easy_install), and --single-version-externally-managed
keeps Setuptools doing egg directories. And --record keeps track of
installed files, which are later moved around to facilitate uninstall.
But some distributions pay extra attention to those options, or do
other tricky things in their setup.py, and as a result this causes
failures. Because easy_install is just calling internal methods, it
kind of sidelines those tricks (also people don't tend to give these
options to easy_install, and some don't even exist, so some code paths
just aren't exercised with typical easy_install usage).
Oh, the other reason is the link searching mechanism is slightly
different between the two installers. Not particularly intentionally,
just incidentally. Also because pip doesn't install anything but
source packages, some packages are installable via easy_install but
not pip -- usually this is an oversight on the part of the person
doing the packaging, but they just never noticed.
--
Ian Bicking | http://blog.ianbicking.org | http://twitter.com/ianbicking
More information about the Distutils-SIG
mailing list