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
8
Merge Requests
8
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
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
Show 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
...
@@ -4,6 +4,8 @@ Change History
3.0.0
(
unreleased
)
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
``.
-
Fix
forever
loop
when
changing
``
zc
.
buildout
``
version
via
``
buildout
``.
-
Add
support
for
``
Requires
-
Python
``
metadata
.
-
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,
...
@@ -1141,7 +1141,12 @@ def scripts(reqs, working_set, executable, dest=None,
):
):
assert
executable
==
sys
.
executable
,
(
executable
,
sys
.
executable
)
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
)
path
.
extend
(
extra_paths
)
# order preserving unique
# order preserving unique
unique_path
=
[]
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:
...
@@ -920,8 +920,8 @@ to pass a common base directory of the scripts and eggs:
<BLANKLINE>
<BLANKLINE>
import sys
import sys
sys.path[0:0] = [
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/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/ba',
'/ba',
join(base, 'bar'),
join(base, 'bar'),
base,
base,
...
@@ -954,8 +954,8 @@ We specified an interpreter and its paths are adjusted too:
...
@@ -954,8 +954,8 @@ We specified an interpreter and its paths are adjusted too:
import sys
import sys
<BLANKLINE>
<BLANKLINE>
sys.path[0:0] = [
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/demo-0.3-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/ba',
'/ba',
join(base, 'bar'),
join(base, 'bar'),
base,
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