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

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


Author: cdavid
Date: 2008-09-09 12:12:17 -0500 (Tue, 09 Sep 2008)
New Revision: 4709

Modified:
   trunk/tools/win32/build_scripts/prepare_bootstrap.py
Log:
Add func to build scipy tarball.


Modified: trunk/tools/win32/build_scripts/prepare_bootstrap.py
===================================================================
--- trunk/tools/win32/build_scripts/prepare_bootstrap.py	2008-09-09 17:11:12 UTC (rev 4708)
+++ trunk/tools/win32/build_scripts/prepare_bootstrap.py	2008-09-09 17:12:17 UTC (rev 4709)
@@ -3,6 +3,17 @@
 from os.path import join as pjoin, split as psplit, dirname, exists as pexists
 import re
 
+def build_sdist(chdir):
+    cwd = os.getcwd()
+    try:
+        os.chdir(chdir)
+        cmd = ["python", "setup.py", "sdist", "--format=zip"]
+        subprocess.call(cmd)
+    except Exception, e:
+        raise RuntimeError("Error while executing cmd (%s)" % e)
+    finally:
+        os.chdir(cwd)
+
 def get_svn_version(chdir):
     out = subprocess.Popen(['svn', 'info'], 
                            stdout = subprocess.PIPE, cwd = chdir).communicate()[0]
@@ -51,5 +62,4 @@
 
 if __name__ == '__main__':
     ROOT = os.path.join("..", "..", "..")
-    print get_scipy_version(ROOT)
-    print get_svn_version(ROOT)
+    print build_sdist(ROOT)



More information about the Scipy-svn mailing list