Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
Jérome Perrin
setuptools
Commits
d7dd557d
Commit
d7dd557d
authored
May 28, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'dump_options()' for debugging output.
parent
b09a8fe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
cmd.py
cmd.py
+15
-0
No files found.
cmd.py
View file @
d7dd557d
...
...
@@ -135,6 +135,21 @@ class Command:
raise
RuntimeError
,
\
"abstract method -- subclass %s must override"
%
self
.
__class__
def
dump_options
(
self
,
header
=
None
,
indent
=
""
):
from
distutils.fancy_getopt
import
longopt_xlate
if
header
is
None
:
header
=
"command options for '%s':"
%
self
.
get_command_name
()
print
indent
+
header
indent
=
indent
+
" "
for
(
option
,
_
,
_
)
in
self
.
user_options
:
option
=
string
.
translate
(
option
,
longopt_xlate
)
if
option
[
-
1
]
==
"="
:
option
=
option
[:
-
1
]
value
=
getattr
(
self
,
option
)
print
indent
+
"%s = %s"
%
(
option
,
value
)
def
run
(
self
):
"""A command's raison d'etre: carry out the action it exists
to perform, controlled by the options initialized in
...
...
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