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

Installing from git and specifying the platform or os raises an InvalidMarker error #3249

Closed
samfrench opened this issue Nov 18, 2018 · 3 comments · Fixed by #3253
Closed

Comments

@samfrench
Copy link

Issue description

When running pipenv install using Python3 and pipenv version 2018.11.14, if I specify a platform for a package from GitHub I get an InvalidMarker error.

python3.7/site-packages/pip/_vendor/packaging/markers.py", line 280, in __init__', '    raise InvalidMarker(err_str)', 'pip._vendor.packaging.markers.InvalidMarker: Invalid marker: \'sys_platform == \\\'linux\\\'"\', parse error at \'"\'']

The platform specifications work fine on other modules when not using a git repo.

Expected result

The packages to be able to be installed or ignored from GitHub depending if the platform matched. The same installation behaviour as the packages that are not from GitHub.

Steps to replicate

Pipfile with the platform matchers.

[[source]]
name = "pypi"
verify_ssl = true
url = "https://pypi.org/simple"

[requires]
python_version = "3"

[packages]
tweepy = { git = "https://github.com/tweepy/tweepy", markers="sys_platform == 'linux'" }
picamera = { version = "*", sys_platform = "== 'linux'" }

Using this without "markers" produced the same issue.

tweepy = { git = "https://github.com/tweepy/tweepy", sys_platform = "== 'linux'" }

I am on a Mac and using python 3.7.

@duplicate-issues
Copy link

Hey @samfrench,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄

If not, the maintainers will get to this issue shortly.

Cheers,
Your Friendly Neighborhood ProBot

@techalchemy
Copy link
Member

Ah, technically VCS repos don't really have this capability when they aren't editable I guess. I can just turn the validation aspect of this off to fix it I believe

techalchemy added a commit that referenced this issue Nov 19, 2018
- Parsing of markers in non-editable vcs requirements was broken
- This PR adds some VCS repos, some utility pipfile generation functions
  and some fixture helpers
- Fixes #3249

Signed-off-by: Dan Ryan <dan@danryan.co>
@samfrench
Copy link
Author

@techalchemy, it seems the issue I raised is currently the expected behaviour. You make it sound simple to fix.

If git repos could allow markers to install or skip specific os or platforms, this would be ideal. Thank you for taking a look at this. I'll keep an eye on when the corresponding pr is merged.

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

Successfully merging a pull request may close this issue.

2 participants