Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
9e7af28e
Commit
9e7af28e
authored
Nov 06, 2014
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to latest bootstrap.py
Downloaded from
http://downloads.buildout.org/2/bootstrap.py
parent
adf92861
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
26 deletions
+34
-26
bootstrap.py
bootstrap.py
+34
-26
No files found.
bootstrap.py
View file @
9e7af28e
...
@@ -56,6 +56,9 @@ parser.add_option("-c", "--config-file",
...
@@ -56,6 +56,9 @@ parser.add_option("-c", "--config-file",
"file to be used."
))
"file to be used."
))
parser
.
add_option
(
"-f"
,
"--find-links"
,
parser
.
add_option
(
"-f"
,
"--find-links"
,
help
=
(
"Specify a URL to search for buildout releases"
))
help
=
(
"Specify a URL to search for buildout releases"
))
parser
.
add_option
(
"--allow-site-packages"
,
action
=
"store_true"
,
default
=
False
,
help
=
(
"Let bootstrap.py use existing site packages"
))
options
,
args
=
parser
.
parse_args
()
options
,
args
=
parser
.
parse_args
()
...
@@ -63,32 +66,38 @@ options, args = parser.parse_args()
...
@@ -63,32 +66,38 @@ options, args = parser.parse_args()
######################################################################
######################################################################
# load/install setuptools
# load/install setuptools
to_reload
=
False
try
:
try
:
import
pkg_resources
if
options
.
allow_site_packages
:
import
setuptools
import
setuptools
import
pkg_resources
from
urllib.request
import
urlopen
except
ImportError
:
except
ImportError
:
ez
=
{}
from
urllib2
import
urlopen
try
:
ez
=
{}
from
urllib.request
import
urlopen
exec
(
urlopen
(
'https://bootstrap.pypa.io/ez_setup.py'
).
read
(),
ez
)
except
ImportError
:
from
urllib2
import
urlopen
if
not
options
.
allow_site_packages
:
# ez_setup imports site, which adds site packages
# XXX use a more permanent ez_setup.py URL when available.
# this will remove them from the path to ensure that incompatible versions
exec
(
urlopen
(
'https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py'
# of setuptools are not in the path
).
read
(),
ez
)
import
site
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
# inside a virtualenv, there is no 'getsitepackages'.
ez
[
'use_setuptools'
](
**
setup_args
)
# We can't remove these reliably
if
hasattr
(
site
,
'getsitepackages'
):
if
to_reload
:
for
sitepackage_path
in
site
.
getsitepackages
():
reload
(
pkg_resources
)
sys
.
path
[:]
=
[
x
for
x
in
sys
.
path
if
sitepackage_path
not
in
x
]
import
pkg_resources
# This does not (always?) update the default working set. We will
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
# do it.
ez
[
'use_setuptools'
](
**
setup_args
)
for
path
in
sys
.
path
:
import
setuptools
if
path
not
in
pkg_resources
.
working_set
.
entries
:
import
pkg_resources
pkg_resources
.
working_set
.
add_entry
(
path
)
# This does not (always?) update the default working set. We will
# do it.
for
path
in
sys
.
path
:
if
path
not
in
pkg_resources
.
working_set
.
entries
:
pkg_resources
.
working_set
.
add_entry
(
path
)
######################################################################
######################################################################
# Install buildout
# Install buildout
...
@@ -149,8 +158,7 @@ cmd.append(requirement)
...
@@ -149,8 +158,7 @@ cmd.append(requirement)
import
subprocess
import
subprocess
if
subprocess
.
call
(
cmd
,
env
=
dict
(
os
.
environ
,
PYTHONPATH
=
setuptools_path
))
!=
0
:
if
subprocess
.
call
(
cmd
,
env
=
dict
(
os
.
environ
,
PYTHONPATH
=
setuptools_path
))
!=
0
:
raise
Exception
(
raise
Exception
(
"Failed to execute command:
\
n
%s"
,
"Failed to execute command:
\
n
%s"
%
repr
(
cmd
)[
1
:
-
1
])
repr
(
cmd
)[
1
:
-
1
])
######################################################################
######################################################################
# Import and run buildout
# Import and run buildout
...
...
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