[Distutils] Limitations install_requires?

Phillip J. Eby pje at telecommunity.com
Mon Oct 2 04:05:14 CEST 2006

At 06:45 PM 10/1/2006 -0700, Joshua Boverhof wrote:
>In any case, 4/5 of my dependencies are for one reason or another not
>compatible with setuptools.  I'll ask them to change their ways, in
>any I'm sure this battle will be easier to fight once setuptools is
>part of the standard python distribution.  I thought was slated for
>python2.5, but I've checked the release notes and I don't see mention
>of its inclusion.

One thing was added to Python 2.5: if you install a package under 2.5 using 
the distutils -- assuming you haven't done some serious surgery on the 
distutils, that is -- then the package will be installed with an .egg-info 
file containing the data that setuptools needs to *detect* the package has 
been installed.  So, as long as your users have the dependencies installed, 
setuptools will at least not try to install them a second time.

By the way, one way around the distribution issue: if you can find a way to 
build .egg files for your dependencies, then you can offer them for 
download from your own site, and use dependency_links to point to 
them.  EasyInstall will prefer to use pre-built eggs instead of source, 
which will then work around your problem.

You still, of course, need to be able to build the eggs, but in the 
worst-case scenario, you could do this by zipping the appropriate parts of 
site-packages, along with some extra steps.  If the package uses the 
distutils' standard "install" commands, it should be possible to use a 
trick like:

    setup.py install --root=/some/dir

and then zip up selected subdirectories of /some/dir, adding an EGG-INFO 
subdirectory as well.  The internal format of eggs is documented here:


More information about the Distutils-SIG mailing list