Best practices for simultaneously installed versioned packages?
Ned Deily
nad at acm.org
Tue Jan 5 01:13:10 EST 2010
In article <4B42B45E.9070900 at hastings.org>,
Larry Hastings <larry at hastings.org> wrote:
> Ned Deily wrote:
> > Also, setuptools (and, its successor, distribute, which supports Python
> > 3) allow the installation and management of multiple versions of a
> > package within one python site-library instance.
> That sounds lovely too, but I can't figure out what facility setuptools
> / distribute permits that. Could you be more specific? A link to the
> documentation for this feature would be much appreciated.
By default, easy_install from setuptools/distribute uses version
information from a package's setup.py to qualify the package name and
manipulate python's sys.path to ensure the most recent version is the
one found by default. There are options to easy_install which control
this. See in particular the easy_install "--multi-version" command-line
option (the links here are to those for the Distribute fork of
setuptools):
http://packages.python.org/distribute/easy_install.html
If you need to declare specific version dependencies for other packages,
you can do so in setup.py. See the Declaring Dependencies section of
the setuptools API documentation:
http://packages.python.org/distribute/setuptools.html
Much of the magic is handled by setuptools version of pkg_resources:
http://packages.python.org/distribute/pkg_resources.html
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list