Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
46ad8072
Unverified
Commit
46ad8072
authored
Apr 09, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix markers evaluation for python_version with precision < 3
parent
25156790
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
poetry/packages/__init__.py
+17
-0
No files found.
poetry/packages/__init__.py
View file @
46ad8072
import
os
import
re
from
poetry.semver
import
Version
from
poetry.version.requirements
import
Requirement
from
.dependency
import
Dependency
...
...
@@ -105,6 +106,22 @@ def dependency_from_pep_508(name):
op
=
""
elif
op
==
"!="
:
version
+=
".*"
elif
op
in
(
"<="
,
">"
):
parsed_version
=
Version
.
parse
(
version
)
if
parsed_version
.
precision
==
1
:
if
op
==
"<="
:
op
=
"<"
version
=
parsed_version
.
next_major
.
text
elif
op
==
">"
:
op
=
">="
version
=
parsed_version
.
next_major
.
text
elif
parsed_version
.
precision
==
2
:
if
op
==
"<="
:
op
=
"<"
version
=
parsed_version
.
next_minor
.
text
elif
op
==
">"
:
op
=
">="
version
=
parsed_version
.
next_minor
.
text
elif
op
in
(
"in"
,
"not in"
):
versions
=
[]
for
v
in
re
.
split
(
"[ ,]+"
,
version
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment