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
Xavier Thompson
slapos.buildout
Commits
18a5432c
Commit
18a5432c
authored
Jan 02, 2024
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tmp]: Rename false eggs into .buildout-egg
parent
ad41eed4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+16
-6
No files found.
src/zc/buildout/easy_install.py
View file @
18a5432c
...
...
@@ -248,6 +248,15 @@ def dist_needs_pkg_resources(dist):
)
class
Environment
(
pkg_resources
.
Environment
):
def
__init__
(
self
,
paths
):
super
(
Environment
,
self
).
__init__
(
paths
)
for
project_name
in
self
:
for
dist
in
self
[
project_name
]:
if
dist
.
location
.
endswith
(
'.buildout-egg'
):
dist
.
precedence
=
pkg_resources
.
EGG_DIST
_doing_list
=
type
(
''
,
(),
{
'__mod__'
:
staticmethod
(
lambda
x
:
'
\
n
'
.
join
(
*
x
))})()
...
...
@@ -313,7 +322,7 @@ class Installer(object):
def
_make_env
(
self
):
full_path
=
self
.
_get_dest_dist_paths
()
+
self
.
_get_path_dist_paths
()
+
self
.
_path
env
=
pkg_resources
.
Environment
(
full_path
)
env
=
Environment
(
full_path
)
# this needs to be called whenever self._env is modified (or we could
# make an Environment subclass):
self
.
_eggify_env_dest_dists
(
env
,
self
.
_dest
)
...
...
@@ -337,9 +346,10 @@ class Installer(object):
def
_get_dist_paths
(
self
,
path
):
eggs
=
glob
.
glob
(
os
.
path
.
join
(
path
,
'*.egg'
))
buildout_eggs
=
glob
.
glob
(
os
.
path
.
join
(
path
,
'*.buildout-egg'
))
dists
=
[
os
.
path
.
dirname
(
dist_info
)
for
dist_info
in
glob
.
glob
(
os
.
path
.
join
(
path
,
'*'
,
'*.dist-info'
))]
return
list
(
set
(
eggs
+
dists
))
return
list
(
set
(
eggs
+
buildout_eggs
+
dists
))
@
staticmethod
def
_eggify_env_dest_dists
(
env
,
dest
):
...
...
@@ -462,7 +472,7 @@ class Installer(object):
paths
=
call_pip_install
(
spec
,
tmp
,
self
)
dists
=
[]
env
=
pkg_resources
.
Environment
(
paths
)
env
=
Environment
(
paths
)
for
project
in
env
:
dists
.
extend
(
env
[
project
])
...
...
@@ -817,7 +827,7 @@ class Installer(object):
# Note that we don't use the existing environment, because we want
# to look for new eggs unless what we have is the best that
# matches the requirement.
env
=
pkg_resources
.
Environment
(
ws
.
entries
)
env
=
Environment
(
ws
.
entries
)
while
requirements
:
# Process dependencies breadth-first.
...
...
@@ -1933,7 +1943,7 @@ def make_egg_after_pip_install(dest, distinfo_dir):
base
=
"{}-{}"
.
format
(
distro
.
egg_name
(),
pkg_resources
.
get_supported_platform
()
)
egg_name
=
base
+
'.egg'
egg_name
=
base
+
'.
buildout-
egg'
new_distinfo_dir
=
base
+
'.dist-info'
egg_dir
=
os
.
path
.
join
(
dest
,
egg_name
)
os
.
mkdir
(
egg_dir
)
...
...
@@ -2036,7 +2046,7 @@ def _get_matching_dist_in_location(dist, location):
# may be normalized (e.g., 3.3 becomes 3.3.0 when downloaded from
# PyPI.)
env
=
pkg_resources
.
Environment
([
location
])
env
=
Environment
([
location
])
dists
=
[
d
for
project_name
in
env
for
d
in
env
[
project_name
]
]
dist_infos
=
[
(
d
.
project_name
.
lower
(),
d
.
parsed_version
)
for
d
in
dists
]
if
dist_infos
==
[(
dist
.
project_name
.
lower
(),
dist
.
parsed_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