[Numpy-svn] r5897 - trunk/tools/win32build
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Oct 3 02:51:06 EDT 2008
Author: cdavid
Date: 2008-10-03 01:51:03 -0500 (Fri, 03 Oct 2008)
New Revision: 5897
Modified:
trunk/tools/win32build/doall.py
Log:
Update doall script: take the python version to build binaries from the command line instead of global variable.
Modified: trunk/tools/win32build/doall.py
===================================================================
--- trunk/tools/win32build/doall.py 2008-10-03 06:50:32 UTC (rev 5896)
+++ trunk/tools/win32build/doall.py 2008-10-03 06:51:03 UTC (rev 5897)
@@ -1,13 +1,25 @@
import subprocess
import os
-PYVER = "2.5"
+if __name__ == '__main__':
+ from optparse import OptionParser
+ parser = OptionParser()
+ parser.add_option("-p", "--pyver", dest="pyver",
+ help = "Python version (2.4, 2.5, etc...)")
-# Bootstrap
-subprocess.check_call(['python', 'prepare_bootstrap.py', '-p', PYVER])
+ opts, args = parser.parse_args()
+ pyver = opts.pyver
-# Build binaries
-subprocess.check_call(['python', 'build.py', '-p', PYVER], cwd = 'bootstrap-%s' % PYVER)
+ if not pyver:
+ pyver = "2.5"
-# Build installer using nsis
-subprocess.check_call(['makensis', 'numpy-superinstaller.nsi'], cwd = 'bootstrap-%s' % PYVER)
+ # Bootstrap
+ subprocess.check_call(['python', 'prepare_bootstrap.py', '-p', pyver])
+
+ # Build binaries
+ subprocess.check_call(['python', 'build.py', '-p', pyver],
+ cwd = 'bootstrap-%s' % pyver)
+
+ # Build installer using nsis
+ subprocess.check_call(['makensis', 'numpy-superinstaller.nsi'],
+ cwd = 'bootstrap-%s' % pyver)
More information about the Numpy-svn
mailing list