At 11:04 AM 11/7/2008 -0500, Ross Vandegrift wrote:
Hello everyone,
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 "elementtree>=1.2". 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 Python2.5.
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.