Add patch from upstream to fix python3.3 issues in linalg routines

This commit is contained in:
Orion Poplawski 2013-02-13 21:28:10 -07:00
parent aec9c686b5
commit 86c67932b9
2 changed files with 109 additions and 2 deletions

100
scipy-linalg.patch Normal file
View File

@ -0,0 +1,100 @@
diff -up scipy-0.11.0/scipy/linalg/flapack.pyf.src.linalg scipy-0.11.0/scipy/linalg/flapack.pyf.src
--- scipy-0.11.0/scipy/linalg/flapack.pyf.src.linalg 2012-09-10 15:37:39.000000000 -0600
+++ scipy-0.11.0/scipy/linalg/flapack.pyf.src 2013-02-13 21:25:50.684650798 -0700
@@ -1470,7 +1470,7 @@ subroutine <prefix2>sbevx(ab,ldab,comput
!* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
!* reduction to tridiagonal form.
!* If JOBZ = 'N', the array Q is not referenced.
- integer intent(hide),depend(n) :: ldq=(compute_v?n:1)
+ integer intent(hide),depend(n,compute_v) :: ldq=(compute_v?n:1)
<ftype2> dimension(ldq,ldq),intent(hide),depend(ldq) :: q
@@ -1495,8 +1495,8 @@ subroutine <prefix2>sbevx(ab,ldab,comput
<ftype2> dimension(n),intent(out),depend(n) :: w
- <ftype2> dimension(ldz,mmax),intent(out) :: z
- integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
+ <ftype2> dimension(ldz,mmax),depend(ldz,mmax),intent(out) :: z
+ integer intent(hide),depend(n,compute_v) :: ldz=(compute_v?n:1)
! We use the mmax parameter to fix the size of z
! (only if eigenvalues are requested)
@@ -1507,12 +1507,12 @@ subroutine <prefix2>sbevx(ab,ldab,comput
! number of eigenvalues in the interval in advance.
! As default we use the maximum value
! but the user should use an appropriate mmax.
- integer intent(in),depend(n) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
+ integer intent(in),depend(n,iu,il,compute_v,range) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
integer intent(out) :: m
- <ftype2> dimension(7*n),intent(hide) :: work
- integer dimension(5*n),intent(hide) :: iwork
- integer dimension((compute_v?n:1)),intent(out) :: ifail
+ <ftype2> dimension(7*n),depend(n),intent(hide) :: work
+ integer dimension(5*n),depend(n),intent(hide) :: iwork
+ integer dimension((compute_v?n:1)),depend(n,compute_v),intent(out) :: ifail
integer intent(out):: info
end subroutine <prefix2>sbevx
@@ -1590,7 +1590,7 @@ subroutine <prefix2c>hbevx(ab,ldab,compu
!* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
!* reduction to tridiagonal form.
!* If JOBZ = 'N', the array Q is not referenced.
- integer intent(hide),depend(n) :: ldq=(compute_v?n:1)
+ integer intent(hide),depend(n,compute_v) :: ldq=(compute_v?n:1)
<ftype2c> dimension(ldq,ldq),intent(hide),depend(ldq) :: q
@@ -1615,8 +1615,8 @@ subroutine <prefix2c>hbevx(ab,ldab,compu
<ftype2> dimension(n),intent(out),depend(n) :: w
- <ftype2c> dimension(ldz,mmax),intent(out) :: z
- integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
+ <ftype2c> dimension(ldz,mmax),depend(ldz,mmax),intent(out) :: z
+ integer intent(hide),depend(n,compute_v) :: ldz=(compute_v?n:1)
! We use the mmax parameter to fix the size of z
! (only if eigenvalues are requested)
@@ -1627,13 +1627,13 @@ subroutine <prefix2c>hbevx(ab,ldab,compu
! number of eigenvalues in the interval in advance.
! As default we use the maximum value
! but the user should use an appropriate mmax.
- integer intent(in),depend(n) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
+ integer intent(in),depend(n,iu,il,compute_v,range) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
integer intent(out) :: m
- <ftype2c> dimension(n),intent(hide) :: work
- <ftype2> dimension(7*n),intent(hide) :: rwork
- integer dimension(5*n),intent(hide) :: iwork
- integer dimension((compute_v?n:1)),intent(out) :: ifail
+ <ftype2c> dimension(n),depend(n),intent(hide) :: work
+ <ftype2> dimension(7*n),depend(n),intent(hide) :: rwork
+ integer dimension(5*n),depend(n),intent(hide) :: iwork
+ integer dimension((compute_v?n:1)),depend(n,compute_v),intent(out) :: ifail
integer intent(out):: info
end subroutine <prefix2c>hbevx
diff -up scipy-0.11.0/scipy/sparse/linalg/eigen/arpack/arpack.pyf.src.linalg scipy-0.11.0/scipy/sparse/linalg/eigen/arpack/arpack.pyf.src
--- scipy-0.11.0/scipy/sparse/linalg/eigen/arpack/arpack.pyf.src.linalg 2012-09-10 15:37:41.000000000 -0600
+++ scipy-0.11.0/scipy/sparse/linalg/eigen/arpack/arpack.pyf.src 2013-02-13 21:25:50.686650709 -0700
@@ -29,7 +29,7 @@ python module _arpack ! in
character :: howmny
logical dimension(ncv) :: select
<_rd> dimension(nev),intent(out),depend(nev) :: d
- <_rd> dimension(n,nev),intent(out),depend(nev) :: z
+ <_rd> dimension(n,nev),intent(out),depend(n,nev) :: z
integer optional,check(shape(z,0)==ldz),depend(z) :: ldz=shape(z,0)
<_rd> :: sigma
character :: bmat
@@ -121,7 +121,7 @@ python module _arpack ! in
character :: howmny
logical dimension(ncv) :: select
<_cd> dimension(nev),depend(nev),intent(out) :: d
- <_cd> dimension(n,nev), depend(nev),intent(out) :: z
+ <_cd> dimension(n,nev), depend(n,nev),intent(out) :: z
integer optional,check(shape(z,0)==ldz),depend(z) :: ldz=shape(z,0)
<_cd> :: sigma
<_cd> dimension(3 * ncv),depend(ncv) :: workev

View File

@ -16,12 +16,15 @@
Summary: Scipy: Scientific Tools for Python
Name: scipy
Version: 0.11.0
Release: 3%{?dist}
Release: 4%{?dist}
Group: Development/Libraries
License: BSD and LGPLv2+
Url: http://www.scipy.org
Source0: http://prdownloads.sourceforge.net/scipy/%{name}-%{version}.tar.gz
# Upstream patch from https://github.com/scipy/scipy/pull/404/commits to fix
# python3.3 issues
Patch0: scipy-linalg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: numpy, python-devel,f2py
@ -69,6 +72,7 @@ leading scientists and engineers.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .linalg
cat > site.cfg << EOF
[amd]
@ -116,7 +120,7 @@ env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdi
pushd %{py3dir}
mkdir test
cd test
#PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} python3 -c "import scipy; scipy.test('full')"
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} python3 -c "import scipy; scipy.test('full')"
popd
%endif # with_python3
@ -145,6 +149,9 @@ rm -rf $RPM_BUILD_ROOT
%endif # with_python3
%changelog
* Wed Feb 13 2013 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-4
- Add patch from upstream to fix python3.3 issues in linalg routines
* Tue Feb 12 2013 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-3
- Disable python3 tests for now