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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
1167e212
Commit
1167e212
authored
May 07, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compare using Distribution.parsed_version to account for normalization.
Fixes #451.
parent
9161c43d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
CHANGES.rst
CHANGES.rst
+2
-1
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+8
-5
No files found.
CHANGES.rst
View file @
1167e212
...
...
@@ -4,7 +4,8 @@ Change History
2.11.4
(
unreleased
)
===================
-
Nothing
changed
yet
.
-
Fix
`
issue
451
<
https
://
github
.
com
/
buildout
/
buildout
/
issues
/
451
>`:
distributions
with
a
two
-
digit
version
can
be
installed
.
2.11.3
(
2018
-
04
-
13
)
...
...
src/zc/buildout/easy_install.py
View file @
1167e212
...
...
@@ -1655,13 +1655,16 @@ def _get_matching_dist_in_location(dist, location):
Check if `locations` contain only the one intended dist.
Return the dist with metadata in the new location.
"""
# Getting the dist from the environment causes the
# distribution meta data to be read. Cloning isn't
# good enough.
# Getting the dist from the environment causes the distribution
# meta data to be read. Cloning isn't good enough. We must compare
# dist.parsed_version, not dist.version, because one or the other
# may be normalized (e.g., 3.3 becomes 3.3.0 when downloaded from
# PyPI.)
env
=
pkg_resources
.
Environment
([
location
])
dists
=
[
d
for
project_name
in
env
for
d
in
env
[
project_name
]
]
dist_infos
=
[
(
d
.
project_name
.
lower
(),
d
.
version
)
for
d
in
dists
]
if
dist_infos
==
[(
dist
.
project_name
.
lower
(),
dist
.
version
)]:
dist_infos
=
[
(
d
.
project_name
.
lower
(),
d
.
parsed_
version
)
for
d
in
dists
]
if
dist_infos
==
[(
dist
.
project_name
.
lower
(),
dist
.
parsed_
version
)]:
return
dists
.
pop
()
def
_move_to_eggs_dir_and_compile
(
dist
,
dest
):
...
...
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