Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
84fce0ec
Commit
84fce0ec
authored
Mar 29, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update argument parsing [skip ci]
parent
1797ef49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
util/cythonpp.py
util/cythonpp.py
+17
-17
No files found.
util/cythonpp.py
View file @
84fce0ec
...
...
@@ -1015,37 +1015,37 @@ def dbg(*args):
def
main
():
import
optparse
parser
=
optparse
.
OptionParser
()
parser
.
add_option
(
'--debug'
,
action
=
'store_true'
)
parser
.
add_option
(
'--list'
,
action
=
'store_true'
,
help
=
'Show the list of different conditions'
)
parser
.
add_option
(
'--list-cond'
,
action
=
'store_true'
)
parser
.
add_option
(
'--ignore-cond'
,
action
=
'store_true'
,
help
=
'Ignore conditional directives (only expand definitions)'
)
parser
.
add_option
(
'--write-intermediate'
,
action
=
'store_true'
,
help
=
'Save intermediate files produced by preprocessor and Cython'
)
parser
.
add_option
(
'-o'
,
'--output-file'
,
help
=
'Specify name of generated C file'
)
options
,
args
=
parser
.
parse_args
()
if
len
(
args
)
!=
1
:
sys
.
exit
(
'Expected one argument (filename), got %r'
%
args
)
filename
=
args
[
0
]
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--debug'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--list'
,
action
=
'store_true'
,
help
=
'Show the list of different conditions'
)
parser
.
add_argument
(
'--list-cond'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--ignore-cond'
,
action
=
'store_true'
,
help
=
'Ignore conditional directives (only expand definitions)'
)
parser
.
add_argument
(
'--write-intermediate'
,
action
=
'store_true'
,
help
=
'Save intermediate files produced by preprocessor and Cython'
)
parser
.
add_argument
(
'-o'
,
'--output-file'
,
help
=
'Specify name of generated C file'
)
parser
.
add_argument
(
"input"
)
options
=
parser
.
parse_args
()
filename
=
options
.
input
if
options
.
debug
:
global
DEBUG
DEBUG
=
True
if
options
.
write_intermediate
:
global
WRITE_OUTPUT
WRITE_OUTPUT
=
True
run
=
True
if
options
.
list_cond
:
run
=
False
for
x
in
get_condi
tions
(
filename
):
sys
.
stdout
.
write
(
'* %s
\
n
'
%
(
x
,
)
)
for
x
in
Configuration
.
get_configura
tions
(
filename
):
print
(
"* "
,
x
)
if
options
.
list
:
run
=
False
for
x
in
get
_configurations
(
filename
):
sys
.
stdout
.
write
(
'* %s
\
n
'
%
(
x
,
)
)
for
x
in
Configuration
.
get_complete
_configurations
(
filename
):
print
(
"* "
,
x
)
if
options
.
ignore_cond
:
run
=
False
...
...
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