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

pex can't handle environment markers in requirements file #122

Closed
chassing opened this issue Jun 11, 2015 · 4 comments
Closed

pex can't handle environment markers in requirements file #122

chassing opened this issue Jun 11, 2015 · 4 comments
Assignees

Comments

@chassing
Copy link

I have following requirements.txt:

path.py==5.0; python_version < '3.0'

pex raises following exception:

... pex/requirements.py",> line 78, in requirements_from_lines ...
UnsupportedLine: Could not resolve line: path.py==5.0; python_version < '3.0' (Unknown requirement type: path.py==5.0; python_version < '3.0')
@ghost
Copy link

ghost commented Apr 7, 2016

+1

@okngneer
Copy link

3 years later, environment markers are still unsupported.
requirements.txt look like,

pyarrow==0.9.0; sys_platform != 'darwin'
pyarrow==0.9.post1; sys_platform == 'darwin'

Then PEX tries to grab both requirements and fails.

$ pex -vvv -r requirements.txt
pex: crawling link i=0 link=Link('file:///Users/ironfoot/.pex/build') follow_links=False         
pex: crawling link i=0 link=Link('https://pypi.python.org/simple/pyarrow/') follow_links=False
Could not satisfy all requirements for pyarrow==0.9.0; sys_platform != "darwin":
    pyarrow==0.9.0; sys_platform != "darwin", pyarrow==0.9.post1; sys_platform == "darwin"
$ pex --version
pex 1.5.0

The actual problem I'm running into is that a library I need has a requirement like above so I can't really workaround the issue by removing environment markers.

@jsirois
Copy link
Member

jsirois commented Oct 10, 2018

3 years later, environment markers are still unsupported.

Some good attitude in an OSS setting goes a long way. If 3 years was truly a burden you might have chipped in!

That said, see #592 / #593. The support added in 1.5.0 mistakenly only covered transitive requirements, not top-level. #592 fixes that.

@jsirois jsirois self-assigned this Oct 10, 2018
jsirois added a commit that referenced this issue Oct 10, 2018
Previously, only transitive requirements were filtered.

Fixes #456
Fixes #122
@okngneer
Copy link

Sorry, I didn't mean to sound passive aggressive.
I started using Pants/PEX recently and just realized this issue was opened 3 years ago.
Thanks for the update. I'll check out the new releases.

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

No branches or pull requests

3 participants