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
b501f9a6
Unverified
Commit
b501f9a6
authored
Jun 08, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python requirements when resolving lock
parent
32211b03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
poetry/puzzle/provider.py
+9
-5
tests/installation/fixtures/with-optional-dependencies.test
+0
-13
No files found.
poetry/puzzle/provider.py
View file @
b501f9a6
...
...
@@ -275,10 +275,6 @@ class Provider:
else
:
dependencies
=
package
.
requires
dependencies
=
[
dep
for
dep
in
dependencies
if
dep
.
name
not
in
self
.
UNSAFE_PACKAGES
]
if
not
self
.
_package
.
python_constraint
.
allows_any
(
package
.
python_constraint
):
return
[
Incompatibility
(
...
...
@@ -295,6 +291,14 @@ class Provider:
)
]
dependencies
=
[
dep
for
dep
in
dependencies
if
dep
.
name
not
in
self
.
UNSAFE_PACKAGES
and
self
.
_package
.
python_constraint
.
allows_any
(
dep
.
python_constraint
)
and
self
.
_package
.
platform_constraint
.
matches
(
dep
.
platform_constraint
)
]
return
[
Incompatibility
(
[
Term
(
package
.
to_dependency
(),
True
),
Term
(
dep
,
False
)],
...
...
@@ -316,7 +320,7 @@ class Provider:
for
r
in
package
.
requires
if
r
.
is_activated
()
and
self
.
_package
.
python_constraint
.
allows_any
(
r
.
python_constraint
)
and
self
.
_package
.
platform_constraint
.
matches
(
package
.
platform_constraint
)
and
self
.
_package
.
platform_constraint
.
matches
(
r
.
platform_constraint
)
]
# Searching for duplicate dependencies
...
...
tests/installation/fixtures/with-optional-dependencies.test
View file @
b501f9a6
...
...
@@ -8,18 +8,6 @@ python-versions = "*"
platform
=
"*"
[[
package
]]
name
=
"B"
version
=
"1.1"
description
=
""
category
=
"main"
optional
=
false
python
-
versions
=
"*"
platform
=
"*"
[
package
.
requirements
]
python
=
"~2.4"
[[
package
]]
name
=
"C"
version
=
"1.3"
description
=
""
...
...
@@ -56,6 +44,5 @@ content-hash = "123456789"
[
metadata
.
hashes
]
A
=
[]
B
=
[]
C
=
[]
D
=
[]
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