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
16ea8e6a
Commit
16ea8e6a
authored
May 16, 2020
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: site-packages in sys.path before eggs
Solution: sort packages to push site-packages at the end
parent
188827f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
CHANGES.rst
CHANGES.rst
+2
-0
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+6
-1
src/zc/buildout/easy_install.txt
src/zc/buildout/easy_install.txt
+2
-2
No files found.
CHANGES.rst
View file @
16ea8e6a
...
...
@@ -4,6 +4,8 @@ Change History
3.0.0
(
unreleased
)
==================
-
Scripts
:
ensure
eggs
are
inserted
before
``
site
-
packages
``
in
``
sys
.
path
``.
-
Fix
forever
loop
when
changing
``
zc
.
buildout
``
version
via
``
buildout
``.
-
Add
support
for
``
Requires
-
Python
``
metadata
.
...
...
src/zc/buildout/easy_install.py
View file @
16ea8e6a
...
...
@@ -1141,7 +1141,12 @@ def scripts(reqs, working_set, executable, dest=None,
):
assert
executable
==
sys
.
executable
,
(
executable
,
sys
.
executable
)
path
=
[
dist
.
location
for
dist
in
working_set
]
# ensure eggs are inserted before ``site-packages`` in ``sys.path``.
# TODO ensure develop-eggs are also inserted before ``site-packages``.
dists
=
[
dist
for
dist
in
working_set
]
dists
.
sort
(
key
=
lambda
dist
:
(
-
dist
.
precedence
,
dist
.
project_name
))
path
=
[
dist
.
location
for
dist
in
dists
]
path
.
extend
(
extra_paths
)
# order preserving unique
unique_path
=
[]
...
...
src/zc/buildout/easy_install.txt
View file @
16ea8e6a
...
...
@@ -920,8 +920,8 @@ to pass a common base directory of the scripts and eggs:
<BLANKLINE>
import sys
sys.path[0:0] = [
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
join(base, 'eggs/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/ba',
join(base, 'bar'),
base,
...
...
@@ -954,8 +954,8 @@ We specified an interpreter and its paths are adjusted too:
import sys
<BLANKLINE>
sys.path[0:0] = [
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
join(base, 'eggs/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/ba',
join(base, 'bar'),
base,
...
...
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