[Distutils] Expressing a dependancy on ElementTree
Phillip J. Eby
pje at telecommunity.com
Fri Nov 7 18:29:30 CET 2008
At 11:04 AM 11/7/2008 -0500, Ross Vandegrift wrote:
>I have a library that depends on ElementTree and needs to support both
>Python2.4 and Python2.5 style inclusion of the library.
>In Python2.4, it's a standalone package and can be fetched by
>In Python2.5, it's integrated into the standard library as xml.etree.
>If I pass "elementtree>=1.2.6" in install_requires, setuptools
>downloads the Python2.4 standalone version of the package under
>Any way I can express a dependency on elementtree if and only if I'm
>installing into 2.4?
Have your setup.py check what version it's running under, and declare
the right dependency (or lack thereof). This is really the only way
to deal with things that are bundled in the stdlib, at least until
such time as the stdlib includes .egg-info for bundled packages.
More information about the Distutils-SIG