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
077d571c
Commit
077d571c
authored
May 14, 2021
by
Julien Muchembled
Committed by
Xavier Thompson
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow setuptools to obtain eggs, unless picked versions are allowed
parent
acec5d89
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 @
077d571c
...
@@ -184,6 +184,17 @@ def _execute_permission():
...
@@ -184,6 +184,17 @@ def _execute_permission():
_easy_install_cmd
=
'from setuptools.command.easy_install import main; main()'
_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
(
_doing_list
=
type
(
''
,
(),
{
'__mod__'
:
staticmethod
(
lambda
x
:
'
\
n
'
.
join
(
*
x
))})()
lambda
x
:
'
\
n
'
.
join
(
*
x
))})()
...
@@ -364,8 +375,10 @@ class Installer:
...
@@ -364,8 +375,10 @@ class Installer:
path_list
+=
extra_path
.
split
(
os
.
pathsep
)
path_list
+=
extra_path
.
split
(
os
.
pathsep
)
args
=
[
sys
.
executable
,
'-c'
,
args
=
[
sys
.
executable
,
'-c'
,
(
'import sys; sys.path[0:0] = %r; '
%
path_list
)
+
'import sys; sys.path[0:0] = %r; '
%
path_list
+
(
_easy_install_cmd
,
'-mZUNxd'
,
tmp
]
_easy_install_cmd
if
self
.
_allow_picked_versions
else
_easy_install_cmd_no_install_setup_requires
),
'-mZUNxd'
,
tmp
]
level
=
logger
.
getEffectiveLevel
()
level
=
logger
.
getEffectiveLevel
()
if
level
>
0
:
if
level
>
0
:
args
.
append
(
'-q'
)
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