numpy + scipy patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is spec and my patches to build numpy + scipy on x86_64 FC5:
diff -u numpy/distutils/command/build_clib.py{.orig,}
--- numpy/distutils/command/build_clib.py.orig	2006-03-07 09:18:33.000000000 -0500
+++ numpy/distutils/command/build_clib.py	2006-03-07 09:37:06.000000000 -0500
@@ -162,7 +162,7 @@
                                               macros=macros,
                                               include_dirs=include_dirs,
                                               debug=self.debug,
-                                              extra_postargs=[])
+                                              extra_postargs=extra_postargs)
                 objects.extend(f_objects)
 
             self.compiler.create_static_lib(objects, lib_name,
--- numpy/distutils/fcompiler/gnu.py.orig	2006-02-01 14:01:20.000000000 -0500
+++ numpy/distutils/fcompiler/gnu.py	2006-02-01 17:28:33.000000000 -0500
@@ -29,7 +29,7 @@
         'compiler_f77' : [fc_exe,"-Wall","-fno-second-underscore"],
         'compiler_f90' : None,
         'compiler_fix' : None,
-        'linker_so'    : [fc_exe,"-Wall"],
+        'linker_so'    : [fc_exe,"-shared", "-Wall"],
         'archiver'     : ["ar", "-cr"],
         'ranlib'       : ["ranlib"],
         'linker_exe'   : [fc_exe,"-Wall"]
@@ -211,7 +211,8 @@
 class Gnu95FCompiler(GnuFCompiler):
 
     compiler_type = 'gnu95'
-    version_pattern = r'GNU Fortran 95 \(GCC (?P<version>[^\s*\)]+)'
+#    version_pattern = r'GNU Fortran 95 \(GCC (?P<version>[^\s*\)]+)'
+    version_pattern = r'GNU Fortran 95 \(GCC\)\s*(?P<version>[0-9.]+)'
 
     # 'gfortran --version' results:
     # Debian: GNU Fortran 95 (GCC 4.0.3 20051023 (prerelease) (Debian 4.0.2-3))
@@ -224,6 +225,6 @@
         'compiler_f77' : [fc_exe,"-Wall","-ffixed-form","-fno-second-underscore"],
         'compiler_f90' : [fc_exe,"-Wall","-fno-second-underscore"],
         'compiler_fix' : [fc_exe,"-Wall","-ffixed-form","-fno-second-underscore"],
-        'linker_so'    : [fc_exe,"-Wall"],
+        'linker_so'    : [fc_exe,"-shared", "-Wall"],
         'archiver'     : ["ar", "-cr"],
         'ranlib'       : ["ranlib"],
         'linker_exe'   : [fc_exe,"-Wall"]
%define name numpy
%define version 0.9.6
%define release 1
%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')

Summary: NumPy: array processing for numbers, strings, records, and objects.
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
Patch0: numpy-gnu95.patch
License: BSD
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
Vendor: SciPy Developers <scipy-dev@xxxxxxxxx>
Url: http://numeric.scipy.org

%description
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.


%prep
%setup
%patch0

%build
env CFLAGS="$RPM_OPT_FLAGS" FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py config_fc --fcompiler=gnu95 build

%install
python setup.py config_fc --fcompiler=gnu95 install --root=$RPM_BUILD_ROOT #--record=INSTALLED_FILES

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{python_sitearch}/numpy
%{_bindir}/f2py
diff -u Lib/special/setup.py{.orig,}
--- Lib/special/setup.py.orig	2006-03-07 08:34:03.000000000 -0500
+++ Lib/special/setup.py	2006-03-07 08:34:55.000000000 -0500
@@ -18,7 +18,8 @@
                        macros=define_macros)
 
     # Fortran libraries
-    config.add_library('mach',sources=[join('mach','*.f')])
+#    config.add_library('mach',sources=[join('mach','*.f')])
+    config.add_library('mach',sources=[join('mach','*.f')], extra_compiler_args=['-O0'])
     config.add_library('toms',sources=[join('amos','*.f')])
     config.add_library('amos',sources=[join('toms','*.f')])
     config.add_library('cdf',sources=[join('cdflib','*.f')])
--- Lib/integrate/setup.py.orig	2006-03-07 08:40:40.000000000 -0500
+++ Lib/integrate/setup.py	2006-03-07 08:41:17.000000000 -0500
@@ -13,7 +13,7 @@
     config.add_library('linpack_lite',
                        sources=[join('linpack_lite','*.f')])
     config.add_library('mach',
-                       sources=[join('mach','*.f')])
+                       sources=[join('mach','*.f')], extra_compiler_args=['-O0'])
     config.add_library('quadpack',
                        sources=[join('quadpack','*.f')])
     config.add_library('odepack',
%define name scipy
%define version 0.4.8
%define release 1
%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')

Summary: Scipy: array processing for numbers, strings, records, and objects.
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: BSD
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
Vendor: SciPy Developers <scipy-dev@xxxxxxxxx>
Url: http://numeric.scipy.org
Patch0:	scipy-d1mach.patch

%description
Scipy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  Scipy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.


%prep
%setup
%patch0 -p0

%build
env CFLAGS="$RPM_OPT_FLAGS" FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py config_fc --fcompiler=gnu95 build

%install
env CFLAGS="$RPM_OPT_FLAGS" FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py config_fc --fcompiler=gnu95 install --root=$RPM_BUILD_ROOT #--record=INSTALLED_FILES


%clean
rm -rf $RPM_BUILD_ROOT

%files 
%{python_sitearch}/scipy
%defattr(-,root,root)
-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux