In some cases, there are various modules which each implement a common API (in my case, the old pure-python elementtree
, cElementTree
, lxml.etree
, and the built-in xml.etree
). I can write the module using ElementTree
to try each of these options, and take the first one that exists according to my own preference order -- but I can't find any information on specifying that only one of these must be installed in setup.py
. I want to write something that looks like this:
setup(
...,
install_requires="""
elementtree | cElementTree | lxml
""",
...
)
Is this, or something like it, possible?