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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
b3885eac
Commit
b3885eac
authored
May 14, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow setuptools to obtain eggs, unless picked versions are allowed
parent
f29dac7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+15
-2
No files found.
src/zc/buildout/easy_install.py
View file @
b3885eac
...
...
@@ -290,6 +290,17 @@ def _execute_permission():
_easy_install_cmd
=
'from setuptools.command.easy_install import main; main()'
_easy_install_cmd_no_install_setup_requires
=
"""
\
from setuptools import sandbox
from contextlib import contextmanager
def setup_context(*args):
with sandbox_setup_context(*args):
from pkg_resources import Environment
Environment.obtain = lambda *_: None
yield
sandbox_setup_context = sandbox.setup_context
sandbox.setup_context = contextmanager(setup_context)
"""
+
_easy_install_cmd
_doing_list
=
type
(
''
,
(),
{
'__mod__'
:
staticmethod
(
lambda
x
:
'
\
n
'
.
join
(
*
x
))})()
...
...
@@ -470,8 +481,10 @@ class Installer:
path_list
+=
extra_path
.
split
(
os
.
pathsep
)
args
=
[
sys
.
executable
,
'-c'
,
(
'import sys; sys.path[0:0] = %r; '
%
path_list
)
+
_easy_install_cmd
,
'-mZUNxd'
,
tmp
]
'import sys; sys.path[0:0] = %r; '
%
path_list
+
(
_easy_install_cmd
if
self
.
_allow_picked_versions
else
_easy_install_cmd_no_install_setup_requires
),
'-mZUNxd'
,
tmp
]
level
=
logger
.
getEffectiveLevel
()
if
level
>
0
:
args
.
append
(
'-q'
)
...
...
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