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
Thomas Leymonerie
slapos.buildout
Commits
380ae506
Commit
380ae506
authored
Nov 25, 2014
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #209 from buildout/pin_setuptools_in_bootstrap
Add option to bootstrap.py to pin setuptools version
parents
38b6495d
9796d8d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
bootstrap/bootstrap.py
bootstrap/bootstrap.py
+5
-0
src/zc/buildout/bootstrap.txt
src/zc/buildout/bootstrap.txt
+38
-0
No files found.
bootstrap/bootstrap.py
View file @
380ae506
...
@@ -59,6 +59,7 @@ parser.add_option("-f", "--find-links",
...
@@ -59,6 +59,7 @@ parser.add_option("-f", "--find-links",
parser
.
add_option
(
"--allow-site-packages"
,
parser
.
add_option
(
"--allow-site-packages"
,
action
=
"store_true"
,
default
=
False
,
action
=
"store_true"
,
default
=
False
,
help
=
(
"Let bootstrap.py use existing site packages"
))
help
=
(
"Let bootstrap.py use existing site packages"
))
parser
.
add_option
(
"--setuptools-version"
,
help
=
"use a specific setuptools version"
)
options
,
args
=
parser
.
parse_args
()
options
,
args
=
parser
.
parse_args
()
...
@@ -89,6 +90,10 @@ if not options.allow_site_packages:
...
@@ -89,6 +90,10 @@ if not options.allow_site_packages:
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
)
setup_args
=
dict
(
to_dir
=
tmpeggs
,
download_delay
=
0
)
if
options
.
setuptools_version
is
not
None
:
setup_args
[
'version'
]
=
options
.
setuptools_version
ez
[
'use_setuptools'
](
**
setup_args
)
ez
[
'use_setuptools'
](
**
setup_args
)
import
setuptools
import
setuptools
import
pkg_resources
import
pkg_resources
...
...
src/zc/buildout/bootstrap.txt
View file @
380ae506
...
@@ -89,3 +89,41 @@ Let's make sure the generated `buildout` script uses it::
...
@@ -89,3 +89,41 @@ Let's make sure the generated `buildout` script uses it::
'/sample/eggs/setuptools-...egg',
'/sample/eggs/setuptools-...egg',
'/sample/eggs/zc.buildout-2.0.0...egg',
'/sample/eggs/zc.buildout-2.0.0...egg',
]...
]...
Now trying the `--setuptools-version` option, that let you define a version for
`setuptools`.
Now let's try with `5.3`, which happens to exist::
>>> print_('X'); print_(system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --setuptools-version 5.3')); print_('X')
... # doctest: +ELLIPSIS
X...Generated script '/sample/bin/buildout'...X
Let's make sure the generated `buildout` script uses it::
>>> print_(open(buildout_script).read()) # doctest: +ELLIPSIS
#...
sys.path[0:0] = [
'/sample/eggs/setuptools-5.3...egg',
'/sample/eggs/zc.buildout-...egg',
]...
Now let's try specifying both `zc.buildout` and `setuptools` to versions
which happens to exist::
>>> print_('X'); print_(system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --setuptools-version 5.3 --version 2.0.0')); print_('X')
... # doctest: +ELLIPSIS
X...Generated script '/sample/bin/buildout'...X
Let's make sure the generated `buildout` script uses it::
>>> print_(open(buildout_script).read()) # doctest: +ELLIPSIS
#...
sys.path[0:0] = [
'/sample/eggs/setuptools-5.3...egg',
'/sample/eggs/zc.buildout-2.0.0...egg',
]...
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