numpy-0.9.4 + scipy-0.4.4

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

 



I have built/installed numpy-0.9.4 and scipy-0.4.4 on develop/x86_64.  It
did need a bit of work on the spec file.  I know it's not ready for
release, but I'd like to post my work so far.  Maybe someone would like to
pick it up?

The patch needs a little work.  The issue is, that gfortran has changed the
format of it's --version message, which broke the regex matching.  I
supplied one that will work for gcc4.1.0, but isn't backward compat. 
Someone should really come up with a compatible regex.

Also, I didn't put in buildrequires.  It expects fftw, blas, lapack for the
build.
--- 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.4
%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
%define name scipy
%define version 0.4.4
%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

%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

%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