-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pythondistdeps: "environment markers" (PEP-508) support is broken #15
Comments
cc @ncoghlan |
Wouldn't this be evaluated at build-time and not included in the installed information? |
Hmm, I'm actually not sure.. |
Keep in mind that the distdeps generator only deals with the installed resultant egg/wheel data. All the stuff in |
Hmm, that's actually a good question - I'm not entirely sure what pip/setuptools do with the "Requires-Dist" in METADATA where environment markers are concerned. However, my expectation would be that they just copy them through verbatim, environment markers and all, rather than only copying through the ones that definitely apply. The motivation for that behaviour would be wheel files that are compatible with multiple versions: since the wheel file may be cross-version and/or cross-platform, it needs to express environment dependent dependencies. That METADATA file would then be copied verbatim into the installation directory. |
@ncoghlan It's important to note we don't read the data directly. We get the data through the |
So |
@ncoghlan do you think it would be possible to "fake" python version so |
It actually seems like setuptools bug, because |
Not sure if upstream will accept PR: pypa/setuptools#1275 If they won't, we should be able to trivially mock |
@ignatenkobrain Attempting to fake the state that environment markers check (and doing so incompletely) is currently causing pain in pipenv: pypa/pipenv#857 But if you can get pkg_resources to support this natively, then I think that would be the ideal outcome (and based on reading the linked issue, Jason seems amenable to that approach) |
This is now also breaking some things in rawhide / python 3.8, because the dependency |
@decathorpe Environment markers are supposed to be processed at build time and filtered out. Where are you seeing this? |
https://src.fedoraproject.org/rpms/python-keyring The automatically generated Requires include I assume this is a problem with the interaction with setuptools-scm, since this works when using plain setup.py, but not here with setup.py + setup.cfg + setuptools-scm. |
@Conan-Kudo Ugh ... nevermind. It's a packaging error with manually specified |
We do. |
FTR I believe this is done here: python-rpm-packaging/scripts/pythondistdeps.py Lines 118 to 119 in a18ca48
|
Right now people can use something like
argparse; python_version=='2.6'
. We need somehow to parse that.https://www.python.org/dev/peps/pep-0508/#environment-markers
The text was updated successfully, but these errors were encountered: