[Scipy-svn] r4717 - trunk/tools/win32/build_scripts

scipy-svn@scip... scipy-svn@scip...
Tue Sep 9 12:19:23 CDT 2008


Author: cdavid
Date: 2008-09-09 12:18:55 -0500 (Tue, 09 Sep 2008)
New Revision: 4717

Modified:
   trunk/tools/win32/build_scripts/prepare_bootstrap.py
Log:
Add nsis script to bootstap.


Modified: trunk/tools/win32/build_scripts/prepare_bootstrap.py
===================================================================
--- trunk/tools/win32/build_scripts/prepare_bootstrap.py	2008-09-09 17:17:57 UTC (rev 4716)
+++ trunk/tools/win32/build_scripts/prepare_bootstrap.py	2008-09-09 17:18:55 UTC (rev 4717)
@@ -88,6 +88,23 @@
         verstr += get_svn_version(src_root)
     return verstr
 
+def prepare_nsis_script(bootstrap, pyver, numver):
+    tpl = os.path.join('nsis_scripts', 'scipy-superinstaller.nsi.in')
+    source = open(tpl, 'r')
+    target = open(pjoin(bootstrap, 'scipy-superinstaller.nsi'), 'w')
+
+    installer_name = 'scipy-%s-win32-superpack-python%s.exe' % (numver, pyver)
+    cnt = "".join(source.readlines())
+    cnt = cnt.replace('@SCIPY_INSTALLER_NAME@', installer_name)
+    for arch in ['nosse', 'sse2', 'sse3']:
+        cnt = cnt.replace('@%s_BINARY@' % arch.upper(),
+                          get_binary_name(arch))
+
+    target.write(cnt)
+
+def get_binary_name(arch):
+    return "scipy-%s-%s.exe" % (get_scipy_version(ROOT), arch)
+
 def prepare_bootstrap(src_root, pyver):
     bootstrap = "bootstrap-%s" % pyver
     if os.path.exists(bootstrap):
@@ -98,6 +115,7 @@
     prepare_scipy_sources(src_root, bootstrap)
 
     shutil.copy('build.py', bootstrap)
+    prepare_nsis_script(bootstrap, pyver, get_numpy_version())
 
 if __name__ == '__main__':
     ROOT = os.path.join("..", "..", "..")



More information about the Scipy-svn mailing list