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

scipy-svn@scip... scipy-svn@scip...
Tue Oct 21 00:11:06 CDT 2008


Author: cdavid
Date: 2008-10-21 00:11:03 -0500 (Tue, 21 Oct 2008)
New Revision: 4805

Modified:
   trunk/tools/win32/build_scripts/pavement.py
Log:
Start the build task.

Modified: trunk/tools/win32/build_scripts/pavement.py
===================================================================
--- trunk/tools/win32/build_scripts/pavement.py	2008-10-21 05:09:27 UTC (rev 4804)
+++ trunk/tools/win32/build_scripts/pavement.py	2008-10-21 05:11:03 UTC (rev 4805)
@@ -8,8 +8,13 @@
 SRC_ROOT = normpath(pjoin(os.getcwd(), os.pardir, os.pardir, os.pardir))
 BUILD_ROOT = os.getcwd()
 
-PYVER = 2.5
+PYVER = '2.5'
+ARCH = 'nosse'
 
+PYEXECS = {"2.5" : "C:\python25\python.exe",
+        "2.4" : "C:\python24\python24.exe",
+        "2.3" : "C:\python23\python23.exe"}
+
 options(
     clean=Bunch(
         src_dir = SRC_ROOT,
@@ -21,6 +26,10 @@
     ),
     build_sdist=Bunch(
         src_dir = SRC_ROOT
+    ),
+    build=Bunch(
+        pyver = PYVER,
+        arch = ARCH
     )
 )
 
@@ -61,6 +70,12 @@
 def bootstrap():
     prepare_scipy_sources(options.src_dir, bootstrap_dir(options.pyver))
 
+@task
+def build():
+    pyver = options.pyver
+    arch = options.arch
+    print "Building scipy binary for python %s, arch is %s" % (get_python_exec(pyver), arch)
+
 # Helpers
 def get_sdist_tarball(src_root):
     """Return the name of the installer built by sdist command."""
@@ -137,3 +152,18 @@
         raise ValueError("Error while parsing svn version ?")
 
     return svnver
+
+def get_python_exec(ver):
+    """Return the executable of python for the given version."""
+    # XXX Check that the file actually exists
+    try:
+        return PYEXECS[ver]
+    except KeyError:
+        raise ValueError("Version %s not supported/recognized" % ver)
+
+def write_site_cfg(arch):
+    if pexists("site.cfg"):
+        os.remove("site.cfg")
+    f = open("site.cfg", 'w')
+    f.writelines(SITECFG[arch])
+    f.close()



More information about the Scipy-svn mailing list