Skip to content
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

"and extra" breaks environment marker logic #212

Closed
jaraco opened this issue Dec 30, 2017 · 1 comment
Closed

"and extra" breaks environment marker logic #212

jaraco opened this issue Dec 30, 2017 · 1 comment

Comments

@jaraco
Copy link
Member

jaraco commented Dec 30, 2017

In pypa/setuptools#1242, we discovered that wheel is allegedly simply appending and extra=="...", which will break the logic when the existing environment marker contains or expressions.

@benoit-pierre
Copy link
Member

Tentative patch:

 wheel/metadata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git i/wheel/metadata.py w/wheel/metadata.py
index 29638e7..75dce67 100644
--- i/wheel/metadata.py
+++ w/wheel/metadata.py
@@ -255,7 +255,7 @@ def generate_requirements(extras_require):
         if extra:
             yield ('Provides-Extra', extra)
             if condition:
-                condition += " and "
+                condition = "(" + condition + ") and "
             condition += "extra == '%s'" % extra
         if condition:
             condition = '; ' + condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants