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
16a14ce8
Commit
16a14ce8
authored
Jan 06, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: bootstraps weren't completed correctly if settings (X:Y=Z) were used.
parent
1c6bcc74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
13 deletions
+74
-13
bootstrap/bootstrap.py
bootstrap/bootstrap.py
+13
-12
src/zc/buildout/bootstrap_cl_settings.test
src/zc/buildout/bootstrap_cl_settings.test
+60
-0
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+1
-1
No files found.
bootstrap/bootstrap.py
View file @
16a14ce8
...
...
@@ -134,13 +134,7 @@ parser.add_option("-c", None, action="store", dest="config_file",
help
=
(
"Specify the path to the buildout configuration "
"file to be used."
))
options
,
orig_args
=
parser
.
parse_args
()
args
=
[]
# if -c was provided, we push it back into args for buildout's main function
if
options
.
config_file
is
not
None
:
args
+=
[
'-c'
,
options
.
config_file
]
options
,
args
=
parser
.
parse_args
()
if
options
.
eggs
:
eggs_dir
=
os
.
path
.
abspath
(
os
.
path
.
expanduser
(
options
.
eggs
))
...
...
@@ -154,7 +148,7 @@ if options.setup_source is None:
options
.
setup_source
=
setuptools_source
if
options
.
accept_buildout_test_releases
:
args
.
append
(
'buildout:accept-buildout-test-releases=true'
)
args
.
insert
(
0
,
'buildout:accept-buildout-test-releases=true'
)
try
:
import
pkg_resources
...
...
@@ -268,9 +262,16 @@ if exitcode != 0:
ws
.
add_entry
(
eggs_dir
)
ws
.
require
(
requirement
)
import
zc.buildout.buildout
if
orig_args
:
# run buildout with commands passed to bootstrap.py, then actually bootstrap
zc
.
buildout
.
buildout
.
main
(
args
+
orig_args
)
zc
.
buildout
.
buildout
.
main
(
args
+
[
'bootstrap'
])
# If there isn't already a command in the args, add bootstrap
if
not
[
a
for
a
in
args
if
'='
not
in
a
]:
args
.
append
(
'bootstrap'
)
# if -c was provided, we push it back into args for buildout's main function
if
options
.
config_file
is
not
None
:
args
[
0
:
0
]
=
[
'-c'
,
options
.
config_file
]
zc
.
buildout
.
buildout
.
main
(
args
)
if
not
options
.
eggs
:
# clean up temporary egg directory
shutil
.
rmtree
(
eggs_dir
)
src/zc/buildout/bootstrap_cl_settings.test
0 → 100644
View file @
16a14ce8
Some
people
pass
buildout
settings
to
bootstrap
.
>>>
import
os
,
sys
>>>
from
os
.
path
import
dirname
,
join
>>>
import
zc
.
buildout
>>>
bootstrap_py
=
join
(
...
dirname
(
...
dirname
(
...
dirname
(
...
dirname
(
zc
.
buildout
.
__file__
)
...
)
...
)
...
),
...
'bootstrap'
,
'bootstrap.py'
)
>>>
top
=
tmpdir
(
'top'
)
>>>
mkdir
(
top
,
'buildout'
)
>>>
os
.
chdir
(
top
)
>>>
write
(
'buildout'
,
'buildout.cfg'
,
...
'''
... [buildout]
... parts =
... '''
)
>>>
write
(
'bootstrap.py'
,
open
(
bootstrap_py
)
.
read
())
>>>
print
'X'
;
print
system
(
...
zc
.
buildout
.
easy_install
.
_safe_arg
(
sys
.
executable
)
+
...
' bootstrap.py buildout:directory='
+
top
+
...
' -c'
+
join
(
'buildout'
,
'buildout.cfg'
)
...
);
print
'X'
# doctest: +ELLIPSIS
X
Creating
directory
'/top/bin'
.
Creating
directory
'/top/parts'
.
Creating
directory
'/top/eggs'
.
Creating
directory
'/top/develop-eggs'
.
Generated
script
'/top/bin/buildout'
.
...
X
They
might
do
it
with
init
,
but
no
worries
:
>>>
remove
(
top
)
>>>
top
=
tmpdir
(
'top'
)
>>>
mkdir
(
top
,
'buildout'
)
>>>
os
.
chdir
(
top
)
>>>
write
(
'bootstrap.py'
,
open
(
bootstrap_py
)
.
read
())
>>>
print
'X'
;
print
system
(
...
zc
.
buildout
.
easy_install
.
_safe_arg
(
sys
.
executable
)
+
...
' bootstrap.py buildout:directory='
+
top
+
...
' -c'
+
join
(
'buildout'
,
'buildout.cfg'
)
+
...
' init'
...
);
print
'X'
# doctest: +ELLIPSIS
X
Creating
'/top/buildout/buildout.cfg'
.
Creating
directory
'/top/bin'
.
Creating
directory
'/top/parts'
.
Creating
directory
'/top/eggs'
.
Creating
directory
'/top/develop-eggs'
.
Generated
script
'/top/bin/buildout'
.
...
X
src/zc/buildout/tests.py
View file @
16a14ce8
...
...
@@ -4328,7 +4328,7 @@ def test_suite():
if os.path.exists(bootstrap_py):
test_suite.append(doctest.DocFileSuite(
'bootstrap.txt', 'bootstrap1.txt',
'bootstrap.txt', 'bootstrap1.txt',
'bootstrap_cl_settings.test',
setUp=bootstrapSetup,
tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([
...
...
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