Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.buildout
Commits
9b693f15
Commit
9b693f15
authored
Mar 24, 2022
by
Thomas Leymonerie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/zc/buildout: Add cond if slapos picked versions
parent
7a9f7b40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+15
-8
No files found.
src/zc/buildout/easy_install.py
View file @
9b693f15
...
@@ -564,7 +564,7 @@ class Installer:
...
@@ -564,7 +564,7 @@ class Installer:
wheel
=
getattr
(
requirement
,
'wheel'
,
False
)
wheel
=
getattr
(
requirement
,
'wheel'
,
False
)
dists
=
[
dist
for
dist
in
index
[
requirement
.
project_name
]
dists
=
[
dist
for
dist
in
index
[
requirement
.
project_name
]
if
((
dist
in
requirement
)
if
((
dist
in
requirement
)
and
(
dist
.
precedence
==
WHL_DIST
)
==
wheel
and
and
(
(
dist
.
precedence
==
WHL_DIST
)
==
wheel
or
self
.
_is_dist_picked
(
dist
,
requirement
))
and
((
not
source
)
or
((
not
source
)
or
(
dist
.
precedence
==
pkg_resources
.
SOURCE_DIST
)
(
dist
.
precedence
==
pkg_resources
.
SOURCE_DIST
)
)
)
...
@@ -581,6 +581,9 @@ class Installer:
...
@@ -581,6 +581,9 @@ class Installer:
# There are final dists, so only use those
# There are final dists, so only use those
dists
=
fdists
dists
=
fdists
# Filter out wheels if possible
dists
=
[
d
for
d
in
dists
if
d
.
precedence
!=
WHL_DIST
]
or
dists
# Now find the best one:
# Now find the best one:
best
=
[]
best
=
[]
bestv
=
None
bestv
=
None
...
@@ -742,13 +745,7 @@ class Installer:
...
@@ -742,13 +745,7 @@ class Installer:
if
self
.
_check_picked
:
if
self
.
_check_picked
:
# Check whether we picked a version and, if we did, report it:
# Check whether we picked a version and, if we did, report it:
for
dist
in
dists
:
for
dist
in
dists
:
if
not
(
if
self
.
_is_dist_picked
(
dist
,
requirement
):
dist
.
precedence
==
pkg_resources
.
DEVELOP_DIST
or
(
len
(
requirement
.
specs
)
==
1
and
requirement
.
specs
[
0
][
0
]
==
'=='
)
):
logger
.
debug
(
'Picked: %s = %s'
,
logger
.
debug
(
'Picked: %s = %s'
,
dist
.
project_name
,
dist
.
version
)
dist
.
project_name
,
dist
.
version
)
self
.
_picked_versions
[
dist
.
project_name
]
=
dist
.
version
self
.
_picked_versions
[
dist
.
project_name
]
=
dist
.
version
...
@@ -761,6 +758,16 @@ class Installer:
...
@@ -761,6 +758,16 @@ class Installer:
return
dists
return
dists
def
_is_dist_picked
(
self
,
dist
,
requirement
):
return
not
(
dist
.
precedence
==
pkg_resources
.
DEVELOP_DIST
or
(
len
(
requirement
.
specs
)
==
1
and
requirement
.
specs
[
0
][
0
]
==
'=='
)
)
def
_maybe_add_setuptools
(
self
,
ws
,
dist
):
def
_maybe_add_setuptools
(
self
,
ws
,
dist
):
if
dist
.
has_metadata
(
'namespace_packages.txt'
):
if
dist
.
has_metadata
(
'namespace_packages.txt'
):
for
r
in
dist
.
requires
():
for
r
in
dist
.
requires
():
...
...
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