I think setuptools' :-separated environment markers mechanism is
great, and shouldn't need to be ratified anywhere. I also think the
actual environment markers specification is stable, although I noticed
the IPython wheel for example is using the deprecated .-separated
rather than _-separated identifiers.
These kinds of conditionals are obviously an important feature for
wheel and replace a common if/else statement inside setup.py, but can
only be specified in wheels by placing a copy of the requirements in
setup.cfg. It would be better if bdist_wheel could also just translate
the setuptools requirements.txt to its own format.
I assume extras_require = { ":sys_platform='win32'" :
"wincertstore==0.2" } would be likely to specify a non-extra (the
extra named '' or None?) dependency?
Post by PJ EbyPost by Daniel HolthHow do I specify a conditional (marker-guarded) non-extra dependency
in setuptools? The syntax for a conditional extra dependency is
extras_require = {
"ssl:sys_platform=='win32'": "wincertstore==0.2",
"certs": "certifi==1.0.1",
},
I only implemented support via extras, and the feature wasn't officially
supported (still isn't, I don't think) because the PEP specifying the syntax
wasn't fully baked yet. I figured that if *only* setuptools itself used it,
then if the syntax changed only setuptools would break... but fix itself at
the same time.
The same cannot be said for any other package, so use at your own risk. Or
better yet, don't use it. ;-)
(At least, not until it's a documented feature w/a PEP-approved syntax.)
Post by Daniel Holth_______________________________________________
https://mail.python.org/mailman/listinfo/distutils-sig