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
d2ea054d
Commit
d2ea054d
authored
Jul 20, 2013
by
Yusuke Tsutsumi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with import blocking at wrong point
parent
9bcc9042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
bootstrap/bootstrap.py
bootstrap/bootstrap.py
+9
-6
No files found.
bootstrap/bootstrap.py
View file @
d2ea054d
...
@@ -72,21 +72,24 @@ ez = {}
...
@@ -72,21 +72,24 @@ ez = {}
# XXX use a more permanent ez_setup.py URL when available.
# XXX use a more permanent ez_setup.py URL when available.
exec
(
urlopen
(
'https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py'
exec
(
urlopen
(
'https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py'
).
read
(),
ez
)
).
read
(),
ez
)
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
ez
[
'use_setuptools'
](
**
setup_args
)
import
setuptools
# ez_setup imports site, which adds site packages
# ez_setup imports site, which adds site packages
# this will remove them to ensure that incompataible versions
# this will remove them to ensure that incompataible versions
# of setuptools are not installed
# of setuptools are not installed
import
site
import
site
# inside a virtualenv, there is no 'getsitepackages'.
# We can't remove these reliably
if
hasattr
(
site
,
'getsitepackages'
):
if
hasattr
(
site
,
'getsitepackages'
):
for
sitepackage_path
in
site
.
getsitepackages
():
for
sitepackage_path
in
site
.
getsitepackages
():
sys
.
path
[:]
=
[
x
for
x
in
sys
.
path
if
sitepackage_path
not
in
x
]
sys
.
path
[:]
=
[
x
for
x
in
sys
.
path
if
sitepackage_path
not
in
x
]
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
ez
[
'use_setuptools'
](
**
setup_args
)
import
setuptools
import
pkg_resources
import
pkg_resources
# inside a virtualenv, there is no 'getsitepackages'.
# We can't remove these reliably
#if hasattr(site, 'getsitepackages'):
# for sitepackage_path in site.getsitepackages():
# sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
# This does not (always?) update the default working set. We will
# This does not (always?) update the default working set. We will
# do it.
# do it.
for
path
in
sys
.
path
:
for
path
in
sys
.
path
:
...
...
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