summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-07-28 05:07:59 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-07-28 05:07:59 +0000
commit0a02410ed568b04505acaec9602e9dafd8b2b57b (patch)
treed4ad25f193b7ef6d333f16c129a43e85407d6769
parentd42999f35c6dcafcc213bf408e09fa4a6fc12925 (diff)
downloadnumpy-0a02410ed568b04505acaec9602e9dafd8b2b57b.tar.gz
prepare_bootstrap script now handles pyver correctly, and can be set from command line.
-rw-r--r--tools/win32build/prepare_bootstrap.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/win32build/prepare_bootstrap.py b/tools/win32build/prepare_bootstrap.py
index 5e12950d6..814ceeda4 100644
--- a/tools/win32build/prepare_bootstrap.py
+++ b/tools/win32build/prepare_bootstrap.py
@@ -55,7 +55,7 @@ def prepare_nsis_script(bootstrap, pyver, numver):
target.write(cnt)
-def prepare_bootstrap(numver, pyver = "2.5"):
+def prepare_bootstrap(pyver):
bootstrap = "bootstrap-%s" % pyver
if os.path.exists(bootstrap):
shutil.rmtree(bootstrap)
@@ -95,4 +95,15 @@ def get_numpy_version(chdir = pjoin('..', '..')):
return version
if __name__ == '__main__':
- prepare_bootstrap("2.5")
+ from optparse import OptionParser
+ parser = OptionParser()
+ parser.add_option("-p", "--pyver", dest="pyver",
+ help = "Python version (2.4, 2.5, etc...)")
+
+ opts, args = parser.parse_args()
+ pyver = opts.pyver
+
+ if not pyver:
+ pyver = "2.5"
+
+ prepare_bootstrap(pyver)