[Numpy-svn] r5561 - vendor/tools

numpy-svn@scip... numpy-svn@scip...
Mon Jul 28 01:09:03 CDT 2008


Author: cdavid
Date: 2008-07-28 01:08:59 -0500 (Mon, 28 Jul 2008)
New Revision: 5561

Modified:
   vendor/tools/build.py
   vendor/tools/nosse.cfg
Log:
Add code to build blas-lapack tarball, and set paths in sync with nsis scripts in generated tarballs.

Modified: vendor/tools/build.py
===================================================================
--- vendor/tools/build.py	2008-07-28 06:06:17 UTC (rev 5560)
+++ vendor/tools/build.py	2008-07-28 06:08:59 UTC (rev 5561)
@@ -3,7 +3,7 @@
 from subprocess import Popen
 import shutil
 import os.path
-from os.path import join as pjoin, dirname, abspath
+from os.path import join as pjoin, dirname, abspath, basename
 import glob
 import tarfile
 from ConfigParser import ConfigParser
@@ -16,6 +16,8 @@
 # All path are relative to top directory (vendor)
 LAPACK_SRC = pjoin('src', 'lapack-lite-3.1.1')
 LAPACK_LIB = abspath(pjoin(LAPACK_SRC, 'lapack_MINGW32.a'))
+BLAS_LIB = abspath(pjoin(LAPACK_SRC, 'blas_MINGW32.a'))
+LAPACK_TARBALL = 'lapack-3.1.1.tbz2'
 ATLAS_SRC = pjoin('src', 'atlas-3.8.2')
 ATLAS_BUILDDIR = pjoin(ATLAS_SRC, "MyObj")
 # Use INT_ETIME for lapack if building with gfortran
@@ -27,10 +29,22 @@
     fid = tarfile.open(ATLAS_TARBALL, 'w:bz2')
     try:
         for f in files:
+            af = pjoin(ARCH.lower(), 'mingw32', basename(f))
             fid.add(f)
     finally:
         fid.close()
 
+def build_lapack_tarball():
+    print "====== Building BLAS/LAPACK tarbal ======"
+    fid = tarfile.open(LAPACK_TARBALL, 'w:bz2')
+    try:
+        af = pjoin(ARCH.lower(), 'mingw32', 'libblas.a')
+        fid.add(BLAS_LIB, af)
+        af = pjoin(ARCH.lower(), 'mingw32', 'liblapack.a')
+        fid.add(LAPACK_LIB, af)
+    finally:
+        fid.close()
+
 def build_atlas():
     print "====== Building ATLAS ======"
     p = Popen(['make'], cwd = ATLAS_BUILDDIR)
@@ -75,7 +89,7 @@
 
 TARGETS = {'atlas' : [configure_atlas, build_atlas, build_atlas_tarball],
         'lapack' : [build_lapack],
-        'blas' : [build_blas]}
+        'blas-lapack' : [build_blas, build_lapack, build_lapack_tarball]}
 
 class Config(object):
     def __init__(self):

Modified: vendor/tools/nosse.cfg
===================================================================
--- vendor/tools/nosse.cfg	2008-07-28 06:06:17 UTC (rev 5560)
+++ vendor/tools/nosse.cfg	2008-07-28 06:08:59 UTC (rev 5561)
@@ -5,6 +5,6 @@
 # Pointer Width in bits (Not well detected by ATLAS on Windows at least)
 PW      = 32
 [BUILD_OPTIONS]
-TARGETS = blas,lapack
-LAPACK_F77FLAGS = -O3,-funroll-loops
+TARGETS = blas-lapack
+#LAPACK_F77FLAGS = -O3,-funroll-loops
 F77 = g77



More information about the Numpy-svn mailing list