[Distutils] Better conflict handling & system packager support
Phillip J. Eby
pje at telecommunity.com
Sat Mar 11 01:43:41 CET 2006
The SVN head of setuptools now implements the strategy described below,
allowing it to safely interoperate with system package managers, and even
to allow safely installing replacements for packages found in the
stdlib. The only potential downside is that Python startup imports may now
be a bit slower, since the eggs are placed ahead of the stdlib on sys.path.
However, since the people who are really concerned about super-fast startup
time have already chosen not to use easy_install, I figure this won't hurt
them. :) But it *will* help everybody who's trying to have system
packages interoperate with EasyInstall. For example, if you have a .deb,
.rpm, or win32.exe of a package installed
--single-version-externally-managed, or if you just have some legacy
versions of things floating around, this new feature will do you a lot of good.
(By the way, the new SVN version also automatically sets
--single-version-externally-managed when the "--root" option is given to
the "install" command. This should improve compatibility with most
third-party "bdist_*" commands and other custom build/install processes
that people might have, and fixes a problem in 0.6a10 where install refuses
to run with "--root" if you *haven't* set --single-version-externally-managed.)
Please upgrade (using "ez_setup.py setuptools==dev")and let me know how the
new features work for you. Thanks.
At 06:31 PM 3/8/2006 -0500, Phillip J. Eby wrote:
>Proposed Installation Strategy
>To summarize my proposal for handling installation "conflicts":
>* EasyInstall will write special .pth files with a header and trailer
>"import" hack. It will ignore "import" lines when reading them.
>* I'll change the existing site.py hack to accomodate the out-of-order
>insertion, and make EasyInstall update any existing hacked site.py files.
>* EasyInstall will stop checking for (and deleting) installation conflicts,
>because there will *no longer be such a thing*. The options that control
>conflict detection will remain, but will have no function except to issue
>And to summarize the effects of these changes:
>* Eggs installed by EasyInstall will have sys.path precedence over
>everything else, including the standard library, script directory,
>etc. They will, however, have a precedence order amongst themselves that
>reflects the sequence in which the .pth files were loaded.
>* Invoking site.addsitedir() after pkg_resources is imported may produce
>slightly weirder results than it already does. :)
>* EasyInstall will be able to upgrade stdlib packages, not just via
>PYTHONPATH installs, but also via site-packages installs.
More information about the Distutils-SIG