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
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
72cceb15
Commit
72cceb15
authored
Feb 09, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bin/buildout --version
Fixes
https://bugs.launchpad.net/zc.buildout/+bug/309770
parent
e1194b1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+13
-0
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+9
-0
No files found.
src/zc/buildout/buildout.py
View file @
72cceb15
...
...
@@ -1601,6 +1601,10 @@ Options:
Print this message and exit.
--version
Print buildout version number and exit.
-v
Increase the level of verbosity. This option can be used multiple times.
...
...
@@ -1706,10 +1710,17 @@ Commands:
COMPUTED_VALUE, DEFAULT_VALUE, COMMAND_LINE_VALUE).
"""
def
_help
():
print_
(
_usage
)
sys
.
exit
(
0
)
def
_version
():
version
=
pkg_resources
.
working_set
.
find
(
pkg_resources
.
Requirement
.
parse
(
'zc.buildout'
)).
version
print_
(
"buildout version %s"
%
version
)
sys
.
exit
(
0
)
def
main
(
args
=
None
):
if
args
is
None
:
args
=
sys
.
argv
[
1
:]
...
...
@@ -1772,6 +1783,8 @@ def main(args=None):
elif
op
:
if
orig_op
==
'--help'
:
_help
()
elif
orig_op
==
'--version'
:
_version
()
_error
(
"Invalid option"
,
'-'
+
op
[
0
])
elif
'='
in
args
[
0
]:
option
,
value
=
args
.
pop
(
0
).
split
(
'='
,
1
)
...
...
src/zc/buildout/tests.py
View file @
72cceb15
...
...
@@ -595,6 +595,15 @@ def test_help():
...
"""
def
test_version
():
"""
>>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
>>> print_(system(buildout+' --version'))
... # doctest: +ELLIPSIS
buildout version ...
"""
def
test_bootstrap_with_extension
():
"""
We had a problem running a bootstrap with an extension. Let's make
...
...
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