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

Support package environment markers #17

Merged
merged 1 commit into from
Jan 25, 2019
Merged

Support package environment markers #17

merged 1 commit into from
Jan 25, 2019

Conversation

jparise
Copy link
Collaborator

@jparise jparise commented Jan 25, 2019

Environment markers can be added at the end of a package requirement
line following a semicolon. For example:

Django==1.5.4; python_version < '3'

Teach the parser to recognize this part of the requirements grammar and
use it to allow duplicate package names that have different
requirements. For example, this is now valid:

Django==1.5.4; python_version < '3'
Django==1.11.18; python_version >= '3'

Also, adjust the "unsorted" rule to allow duplicate package names but
enforce the sort order of their version strings.

Environment markers can be added at the end of a package requirement
line following a semicolon. For example:

    Django==1.5.4; python_version < '3'

Teach the parser to recognize this part of the requirements grammar and
use it to allow duplicate package names that have different
requirements. For example, this is now valid:

    Django==1.5.4; python_version < '3'
    Django==1.11.18; python_version >= '3'

Also, adjust the "unsorted" rule to allow duplicate package names but
enforce the sort order of their version strings.
@jparise jparise requested a review from jogo January 25, 2019 17:34
@jparise jparise merged commit 95f892b into master Jan 25, 2019
@jparise jparise deleted the requirements-env branch January 25, 2019 17:40
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 this pull request may close these issues.

2 participants