File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from subprocess import check_output
1111
1212import re
13+ import argparse
14+
15+ # Pre-parse and remove the '--target' argument from sys.argv since we
16+ # need it here already.
17+ parser = argparse .ArgumentParser ()
18+ parser .add_argument ('--target' , default = 'all' )
19+ values , rest = parser .parse_known_args ()
20+ DIST_TARGET = values .target
21+ sys .argv = sys .argv [:1 ] + rest
1322
1423#
1524# DyND is a namespace package that contains the type module dynd.ndt and
3241# option 2) followed by option 3). All options require a clean build
3342# directory. At the minimum build/, dist/ and dynd.egg* must be removed.
3443#
35- DIST_TARGET = 'all'
3644class Target ():
3745 def __init__ (self , target ):
3846 if target not in ['ndt' , 'nd' , 'all' ]:
39- raise ValueError ("unknown distribution target: %s " % target )
47+ raise ValueError ("unknown distribution target: '%s' " % target )
4048 self .target = target
4149
4250 def get_name (self ):
You can’t perform that action at this time.
0 commit comments