Ticket #12423: numpy-1.5.1.p1.diff

File numpy-1.5.1.p1.diff, 5.9 KB (added by jdemeyer, 6 years ago)

Diff for the numpy spkg, for review only

  • SPKG.txt

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1328878822 -3600
    # Node ID a8f14b7495d9381d2e4901bd84ff4f9349492268
    # Parent  03c3e4fd830ef82045e548845c725cc6b952fd50
    Trac #12423: add patch darwin_x86_64.patch
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    11= numpy =
    2 Description: This package adds numerical linear algebra and other numerical computing
     2
     3== Description ==
     4
     5This package adds numerical linear algebra and other numerical computing
    36capabilities to python.
    47
    5 Maintainers:
    6   Josh Kantor
    7   Michael Abshoff
     8== Maintainers ==
     9 * Josh Kantor
    810
    9 Upstream Contact:
    10   Travis Oliphant
    11   Fernando Perez
    12   Brian Granger
     11== Upstream Contact ==
     12 * Travis Oliphant
     13 * Fernando Perez
     14 * Brian Granger
    1315
    14 Dependencies:
    15   Python
    16   Lapack
    17   Blas
    18   Atlas
    19   Fortran
     16== Dependencies ==
     17 * GNU patch
     18 * Python
     19 * Lapack
     20 * Blas
     21 * Atlas
     22 * Fortran
    2023
    21 Special Update/Build Instructions:
    22   * Scipy uses numpy's distutils to control its compilation of fortran code.
    23     Whenever numpy is updated it is necessary to make sure that scipy still builds ok.
    24 
     24== Special Update/Build Instructions ==
     25 * Scipy uses numpy's distutils to control its compilation of fortran code.
     26   Whenever numpy is updated it is necessary to make sure that scipy still builds ok.
    2527
    2628== Changelog ==
    2729
     30=== numpy-1.5.1.p1 (Jeroen Demeyer, 10 February 2012) ==
     31 * #12423: add patch darwin_x86_64.patch from upstream such that the
     32   "x86_64" platform gets recognized as Intel (and therefore, hopefully
     33   the correct CFLAGS are used).
     34 * Use patch for patching.
     35
    2836=== numpy-1.5.1 (Francois Bissey, 18 Feb 2011) ==
    2937 * Update to numpy-1.5.1
    3038 * Upstream tickets #1399, #1605 and #1625 have been fixed in this version,
  • deleted file patches/cygwin-lapack_lite-setup.py

    diff --git a/patches/cygwin-lapack_lite-setup.py b/patches/cygwin-lapack_lite-setup.py
    deleted file mode 100644
    + -  
    1 
    2 import sys
    3 
    4 def configuration(parent_package='',top_path=None):
    5     from numpy.distutils.misc_util import Configuration
    6     from numpy.distutils.system_info import get_info
    7     config = Configuration('linalg',parent_package,top_path)
    8 
    9     config.add_data_dir('tests')
    10 
    11     # Configure lapack_lite
    12     lapack_info = get_info('lapack_opt',0) # and {}
    13     def get_lapack_lite_sources(ext, build_dir):
    14         if not lapack_info:
    15             print "### Warning:  Using unoptimized lapack ###"
    16             return ext.depends[:-1]
    17         else:
    18             if sys.platform=='win32':
    19                 print "### Warning:  python_xerbla.c is disabled ###"
    20                 return ext.depends[:1]
    21             return ext.depends[:2]
    22 
    23     config.add_extension('lapack_lite',
    24                          sources = [get_lapack_lite_sources],
    25                          depends=  ['lapack_litemodule.c',
    26                                     'python_xerbla.c',
    27                                     'zlapack_lite.c', 'dlapack_lite.c',
    28                                     'blas_lite.c', 'dlamch.c',
    29                                     'f2c_lite.c','f2c.h'],
    30                          extra_info = lapack_info,
    31                          extra_link_args = ['-shared']
    32                          )
    33 
    34     return config
    35 
    36 if __name__ == '__main__':
    37     from numpy.distutils.core import setup
    38     setup(configuration=configuration)
  • patches/cygwin-lapack_lite-setup.py.diff

    diff --git a/patches/cygwin-lapack_lite-setup.py.diff b/patches/cygwin-lapack_lite-setup.py.diff
    a b  
    1 --- src/numpy/linalg/setup.py   2009-03-29 06:24:21.000000000 -0500
    2 +++ patches/cygwin-lapack_lite-setup.py 2008-09-25 22:43:28.000000000 -0500
     1--- a/numpy/linalg/setup.py     2009-03-29 06:24:21.000000000 -0500
     2+++ b/numpy/linalg/setup.py     2008-09-25 22:43:28.000000000 -0500
    33@@ -27,7 +27,8 @@
    44                                     'zlapack_lite.c', 'dlapack_lite.c',
    55                                     'blas_lite.c', 'dlamch.c',
  • new file patches/darwin_x86_64.patch

    diff --git a/patches/darwin_x86_64.patch b/patches/darwin_x86_64.patch
    new file mode 100644
    - +  
     1diff -ru src/numpy/distutils/system_info.py src.patched/numpy/distutils/system_info.py
     2--- src/numpy/distutils/system_info.py  2010-11-18 12:11:51.000000000 +0100
     3+++ src.patched/numpy/distutils/system_info.py  2012-02-10 13:55:32.000000000 +0100
     4@@ -1250,7 +1250,8 @@
     5         if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
     6             args = []
     7             link_args = []
     8-            if get_platform()[-4:] == 'i386':
     9+            if get_platform()[-4:] == 'i386' or 'intel' in get_platform() or \
     10+                'i386' in platform.platform():
     11                 intel = 1
     12             else:
     13                 intel = 0
     14@@ -1347,7 +1348,8 @@
     15         if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
     16             args = []
     17             link_args = []
     18-            if get_platform()[-4:] == 'i386':
     19+            if get_platform()[-4:] == 'i386' or 'intel' in get_platform() or \
     20+                'i386' in platform.platform():
     21                 intel = 1
     22             else:
     23                 intel = 0
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    old mode 100644
    new mode 100755
    a b  
    2121   export CC
    2222fi
    2323
     24cd src
     25
     26# Apply patches.
     27patches="../patches/darwin_x86_64.patch"
    2428if [ $UNAME = "CYGWIN" ]; then
    25     echo "CYGWIN: Patching src/numpy/linalg/setup.py"
    26     cp patches/cygwin-lapack_lite-setup.py src/numpy/linalg/setup.py
     29    echo "CYGWIN: Patching numpy/linalg/setup.py"
     30    patches="$patches ../patches/cygwin-lapack_lite-setup.py.diff"
    2731fi
    28 
    29 cd src
     32for patch in $patches; do
     33    patch -p1 <"$patch"
     34    if [ $? -ne 0 ]; then
     35        echo >&2 "Error applying '$patch'"
     36        exit 1
     37    fi
     38done
    3039
    3140echo "[DEFAULT]" > site.cfg
    3241echo "library_dirs = $SAGE_LOCAL/lib" >> site.cfg