-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip install ignores environment markers? #2870
Comments
thats invalid AIUI. ':python_version != "2.6"': ['zodbpickle >= 0.6.0'], should be better. May be unrelated, but I've never seen extras that were string literals. |
Fixed in zopefoundation/ZODB@aa94658, in case that matters. I might've been too hasty with that commit: the setuptools documentation says
(emphasis mine). Also, the metadata.json in the wheel file had it as a list of strings. |
I can reproduce this on Linux if I set Simpler steps to reproduce:
This fails with |
I've unzipped the bad ZODB wheel from https://debesis.gedmin.as/wheels and compared it with the wheel I get if I let pip build it locally. There are some interesting differences: --- bad/ZODB-4.2.0.dist-info/METADATA 2015-06-02 14:48:14.000000000 +0300
+++ good/ZODB-4.2.0.dist-info/METADATA 2015-06-04 09:27:36.000000000 +0300
@@ -34,11 +34,10 @@
Requires-Dist: zc.lockfile
Requires-Dist: zdaemon (>=4.0.0a1)
Requires-Dist: zope.interface
+Requires-Dist: zodbpickle (>=0.6.0); python_version != "2.6"
Provides-Extra: test
Requires-Dist: zope.testing; extra == 'test'
Requires-Dist: manuel; extra == 'test'
-Provides-Extra: :python_version != "2.6"
-Requires-Dist: zodbpickle (>=0.6.0); extra == ':python_version != "2.6"'
The Zope Object Database provides an object-oriented database for
Python that provides a high-degree of transparency. Applications can
--- bad/ZODB-4.2.0.dist-info/WHEEL 2015-06-02 14:48:14.000000000 +0300
+++ good/ZODB-4.2.0.dist-info/WHEEL 2015-06-04 09:27:36.000000000 +0300
@@ -1,5 +1,5 @@
Wheel-Version: 1.0
-Generator: bdist_wheel (0.23.0)
+Generator: bdist_wheel (0.24.0)
Root-Is-Purelib: true
Tag: py2-none-any Minified JSON is, of course, undiffable, but if I pipe it through json.tool, I get --- bad/ZODB-4.2.0.dist-info/metadata.json 2015-06-02 14:48:14.000000000 +0300
+++ good/ZODB-4.2.0.dist-info/metadata.json 2015-06-04 09:27:36.000000000 +0300
@@ -19,62 +19,57 @@
"Operating System :: Unix",
"Framework :: ZODB"
],
- "commands": {
- "wrap_console": {
- "fsdump": "ZODB.FileStorage.fsdump:main",
- "fsoids": "ZODB.scripts.fsoids:main",
- "fsrefs": "ZODB.scripts.fsrefs:main",
- "fstail": "ZODB.scripts.fstail:Main",
- "repozo": "ZODB.scripts.repozo:main"
- }
- },
- "contacts": [
- {
- "email": "zodb-dev@zope.org",
- "name": "Zope Foundation and Contributors",
- "role": "author"
- }
- ],
- "document_names": {
- "description": "DESCRIPTION.rst"
- },
- "exports": {
- "console_scripts": {
- "fsdump": "ZODB.FileStorage.fsdump:main",
- "fsoids": "ZODB.scripts.fsoids:main",
- "fsrefs": "ZODB.scripts.fsrefs:main",
- "fstail": "ZODB.scripts.fstail:Main",
- "repozo": "ZODB.scripts.repozo:main"
+ "extensions": {
+ "python.commands": {
+ "wrap_console": {
+ "fsdump": "ZODB.FileStorage.fsdump:main",
+ "fsoids": "ZODB.scripts.fsoids:main",
+ "fsrefs": "ZODB.scripts.fsrefs:main",
+ "fstail": "ZODB.scripts.fstail:Main",
+ "repozo": "ZODB.scripts.repozo:main"
+ }
+ },
+ "python.details": {
+ "contacts": [
+ {
+ "email": "zodb-dev@zope.org",
+ "name": "Zope Foundation and Contributors",
+ "role": "author"
+ }
+ ],
+ "document_names": {
+ "description": "DESCRIPTION.rst"
+ },
+ "project_urls": {
+ "Home": "http://www.zodb.org/"
+ }
+ },
+ "python.exports": {
+ "console_scripts": {
+ "fsdump": "ZODB.FileStorage.fsdump:main",
+ "fsoids": "ZODB.scripts.fsoids:main",
+ "fsrefs": "ZODB.scripts.fsrefs:main",
+ "fstail": "ZODB.scripts.fstail:Main",
+ "repozo": "ZODB.scripts.repozo:main"
+ }
}
},
"extras": [
- ":python_version != \"2.6\"",
"test"
],
- "generator": "bdist_wheel (0.23.0)",
- "keywords": "database nosql python zope",
+ "generator": "bdist_wheel (0.24.0)",
+ "keywords": [
+ "database",
+ "nosql",
+ "python",
+ "zope"
+ ],
"license": "ZPL 2.1",
"metadata_version": "2.0",
"name": "ZODB",
"platform": "any",
- "project_urls": {
- "Home": "http://www.zodb.org/"
- },
"run_requires": [
{
- "extra": ":python_version != \"2.6\"",
- "requires": [
- "zodbpickle (>=0.6.0)"
- ]
- },
- {
- "extra": "test",
- "requires": [
- "zope.testing",
- "manuel"
- ]
- },
- {
"requires": [
"persistent (>=4.1.0)",
"BTrees (>=4.1.3)",
@@ -85,6 +80,19 @@
"zdaemon (>=4.0.0a1)",
"zope.interface"
]
+ },
+ {
+ "environment": "python_version != \"2.6\"",
+ "requires": [
+ "zodbpickle (>=0.6.0)"
+ ]
+ },
+ {
+ "extra": "test",
+ "requires": [
+ "zope.testing",
+ "manuel"
+ ]
}
],
"summary": "Zope Object Database: object database and persistence", Conclusion: bdist_wheel 0.23.0 did not support environment markers and I need to upgrade. |
This way we avoid pypa/pip#2870 and maybe https://jenkins.gedmin.as/job/zodbbrowser-on-windows/ will finally be green.
Lamentably older versions of bdist_wheel supported environment markers specified in a bdist_wheel-specific setup.cfg section but not those from setup.py. That is because bdist_wheel predates the environment-markers-in-setup.py feature. |
When was the environment-markers-in-setup.py feature introduced? The only environment-marker-related thing in setuptools changelog is for 0.7, which happened ages ago. |
Under some circumstances
pip install
appears to ignore PEP 426 environment markers. So far I've only been able to reproduce this on Windows.Here's the failing Jenkins job:
tox
to build an sdist of zodbbrowser and pip install it into a virtualenv.extras_require[':python_version != "2.6"']
Excerpts from the pip install log:
If you download https://debesis.gedmin.as/wheels/ZODB-4.2.0-py2-none-any.whl and unzip it, inside you'll find a ZODB-4.2.0.dist-info/METADATA with
and a metadata.json with
so the requirement is not lost through the torturous sdist -> bdist_wininst -> wheel convert process.
Why is it being ignored?
(As I said, I cannot reproduce this on Linux, where zodbbrowser's
tox
succeeds.)I've got pip version 7.0.3 and virtualenv version 13.0.3.
The text was updated successfully, but these errors were encountered: