082f9c
%global with_python3 0
082f9c
%{?filter_setup:
082f9c
%filter_provides_in %{python_sitearch}.*\.so$
082f9c
##filter_provides_in #{python3_sitearch}.*\.so$
082f9c
%filter_setup
082f9c
}
082f9c
082f9c
Summary: Scipy: Scientific Tools for Python
082f9c
Name: scipy
082f9c
Version: 0.12.1
082f9c
Release: 1%{?dist}
082f9c
082f9c
Group: Development/Libraries
082f9c
# BSD -- whole package except:
082f9c
# Boost -- scipy/special/cephes/scipy_iv.c
082f9c
# Public Domain -- scipy/odr/__odrpack.c
082f9c
License: BSD and Boost and Public Domain
082f9c
Url: http://www.scipy.org
082f9c
Source0: http://downloads.sourceforge.net/scipy/%{name}-%{version}.tar.gz
082f9c
# Fix definition on gerqf that caused test segfault
082f9c
Patch0:  scipy-gerqf.patch
082f9c
Patch1:  use-argument-build_dir.patch
082f9c
Patch2:  change-wd-to-builddir.patch
082f9c
Patch3:  use-sha-256-instead-of-md5.patch
082f9c
082f9c
BuildRequires: numpy, python2-devel,f2py
082f9c
BuildRequires: python-six
082f9c
BuildRequires: fftw-devel, blas-devel, lapack-devel, suitesparse-devel
082f9c
BuildRequires: atlas-devel
082f9c
BuildRequires: gcc-gfortran, swig
082f9c
Requires: numpy, python,f2py
082f9c
Requires: python-six
082f9c
082f9c
%if 0%{?with_python3}
082f9c
BuildRequires:  python3-numpy, python3-devel, python3-f2py
082f9c
BuildRequires:  python3-setuptools
082f9c
BuildRequires:  python3-nose
082f9c
BuildRequires:  python3-six
082f9c
%endif
082f9c
082f9c
%description
082f9c
Scipy is open-source software for mathematics, science, and
082f9c
engineering. The core library is NumPy which provides convenient and
082f9c
fast N-dimensional array manipulation. The SciPy library is built to
082f9c
work with NumPy arrays, and provides many user-friendly and efficient
082f9c
numerical routines such as routines for numerical integration and
082f9c
optimization. Together, they run on all popular operating systems, are
082f9c
quick to install, and are free of charge. NumPy and SciPy are easy to
082f9c
use, but powerful enough to be depended upon by some of the world's
082f9c
leading scientists and engineers.
082f9c
082f9c
082f9c
%if 0%{?with_python3}
082f9c
%package -n python3-scipy
082f9c
Summary: Scipy: Scientific Tools for Python
082f9c
Group: Development/Libraries
082f9c
License: BSD and LGPLv2+
082f9c
Requires:  python3-numpy, python3-f2py
082f9c
Requires:  python3-six
082f9c
%description -n python3-scipy
082f9c
Scipy is open-source software for mathematics, science, and
082f9c
engineering. The core library is NumPy which provides convenient and
082f9c
fast N-dimensional array manipulation. The SciPy library is built to
082f9c
work with NumPy arrays, and provides many user-friendly and efficient
082f9c
numerical routines such as routines for numerical integration and
082f9c
optimization. Together, they run on all popular operating systems, are
082f9c
quick to install, and are free of charge. NumPy and SciPy are easy to
082f9c
use, but powerful enough to be depended upon by some of the world's
082f9c
leading scientists and engineers.
082f9c
082f9c
%endif # with _python3
082f9c
082f9c
%prep
082f9c
%setup -q
082f9c
%patch0 -p1 -b .gerqf
082f9c
%patch1 -p1
082f9c
%patch2 -p1
082f9c
%patch3 -p1
082f9c
082f9c
# Bundled libs
082f9c
rm scipy/lib/six.py
082f9c
find -name \*.py | xargs sed -i -e 's/scipy\.lib\.six/six/'
082f9c
cat > site.cfg << EOF
082f9c
082f9c
[amd]
082f9c
library_dirs = %{_libdir}
082f9c
include_dirs = /usr/include/suitesparse
082f9c
amd_libs = amd
082f9c
082f9c
[umfpack]
082f9c
library_dirs = %{_libdir}
082f9c
include_dirs = /usr/include/suitesparse
082f9c
umfpack_libs = umfpack
082f9c
EOF
082f9c
082f9c
082f9c
%if 0%{?with_python3}
082f9c
rm -rf %{py3dir}
082f9c
cp -a . %{py3dir}
082f9c
%endif
082f9c
082f9c
%build
082f9c
%if 0%{?with_python3}
082f9c
pushd %{py3dir}
082f9c
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python3 setup.py config_fc --fcompiler=gnu95 --noarch build
082f9c
popd
082f9c
%endif # with _python3
082f9c
082f9c
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py config_fc --fcompiler=gnu95 --noarch build
082f9c
082f9c
082f9c
082f9c
%install
082f9c
rm -rf $RPM_BUILD_ROOT
082f9c
# first install python3 so the binaries are overwritten by the python2 ones
082f9c
%if 0%{?with_python3}
082f9c
pushd %{py3dir}
082f9c
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python3 setup.py install --root=$RPM_BUILD_ROOT
082f9c
popd
082f9c
%endif # with_python3
082f9c
082f9c
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py install --root=$RPM_BUILD_ROOT
082f9c
082f9c
082f9c
%check
082f9c
%if 0%{?with_python3}
082f9c
pushd %{py3dir}
082f9c
mkdir test
082f9c
cd test
082f9c
PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitearch} python3 -c "import scipy; scipy.test('full')"
082f9c
popd
082f9c
%endif # with_python3
082f9c
082f9c
mkdir test
082f9c
cd test
082f9c
PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch} python -c "import scipy; scipy.test('full', verbose=3)" || true
082f9c
082f9c
082f9c
%clean
082f9c
rm -rf $RPM_BUILD_ROOT
082f9c
082f9c
082f9c
%files
082f9c
%doc LICENSE.txt
082f9c
%{python_sitearch}/scipy
082f9c
%{python_sitearch}/*.egg-info
082f9c
082f9c
082f9c
%if 0%{?with_python3}
082f9c
%files -n python3-scipy
082f9c
%doc LICENSE.txt
082f9c
%{python3_sitearch}/scipy
082f9c
%{python3_sitearch}/*.egg-info
082f9c
%endif # with_python3
082f9c
082f9c
%changelog
082f9c
* Wed Oct 16 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.12.1-1
082f9c
- Update to 0.12.1 - fixes CVE-2013-4251 (rhbz#997579)
082f9c
- change working directory to build directory when building ext (rhbz#916695)
082f9c
- use SHA-256 instead of md5 -- FIPS mode (rhbz#877920)
082f9c
- unbundle python-six (bug rhbz#1019642)
082f9c
082f9c
* Thu Oct 03 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.12.0-6
082f9c
- rebuilt due to a bug in gcc causing segfault on s390x (rhbz#1012870 rhbz#1012286)
082f9c
082f9c
* Wed Sep 25 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.12.0-5
082f9c
- rebuilt with atlas 3.10 (rhbz#1009070)
082f9c
082f9c
* Tue Jul 23 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.12.0-4
082f9c
- Add patch to use build_dir argument in build_extension
082f9c
- Fix rpmlint warnings
082f9c
- License Updated
082f9c
- Don't build with python3
082f9c
082f9c
* Wed May 15 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-3
082f9c
- Remove old ufsparse references, use suitesparse
082f9c
- Spec cleanup
082f9c
082f9c
* Mon Apr 15 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-2
082f9c
- Add patch to fix segfaul in test of sgeqrf
082f9c
082f9c
* Wed Apr 10 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-1
082f9c
- Update to 0.12.0 final
082f9c
- No longer remove weave from python3 build
082f9c
082f9c
* Sat Feb 16 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-0.1.b1
082f9c
- Update to 0.12.0b1
082f9c
- Drop upstreamed linalg patch
082f9c
082f9c
* Wed Feb 13 2013 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-4
082f9c
- Add patch from upstream to fix python3.3 issues in linalg routines
082f9c
082f9c
* Tue Feb 12 2013 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-3
082f9c
- Disable python3 tests for now
082f9c
082f9c
* Mon Oct  8 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-2
082f9c
- Add requires python3-numpy, python3-f2py for python3-scipy (bug 863755)
082f9c
082f9c
* Sun Sep 30 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-1
082f9c
- Update to 0.11.0 final
082f9c
082f9c
* Thu Aug 23 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-0.1.rc2
082f9c
- Update to 0.11.0rc2
082f9c
082f9c
* Mon Aug  6 2012 Orion Poplawski <orion@cora.nwra.com> - 0.10.1-4
082f9c
- Rebuild for python 3.3
082f9c
082f9c
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.10.1-3
082f9c
- remove rhel logic from with_python3 conditional
082f9c
082f9c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
082f9c
082f9c
* Fri Mar 16 2012 Orion Poplawski <orion@cora.nwra.com> - 0.10.1-1
082f9c
- Update to 0.10.1
082f9c
082f9c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.0-2
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
082f9c
082f9c
* Mon Nov 14 2011 Orion Poplawski <orion@cora.nwra.com> - 0.10.0-1
082f9c
- Update to 0.10.0
082f9c
082f9c
* Sat Sep  3 2011 Thomas Spura <tomspur@fedoraproject.org> - 0.9.0-2
082f9c
- little cosmetic changes
082f9c
- filter provides in python_sitearch
082f9c
082f9c
* Fri Sep 02 2011 Andrew McNabb <amcnabb@mcnabbs.org>
082f9c
- add python3 subpackage
082f9c
082f9c
* Fri Apr 1 2011 Orion Poplawski <orion@cora.nwra.com> - 0.9.0-1
082f9c
- Update to 0.9.0
082f9c
- Drop all stsci sources and patches, dropped from upstream
082f9c
- Drop gcc and py27 patches fixed upstream
082f9c
- Add %%check section to run tests
082f9c
082f9c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
082f9c
082f9c
* Sat Jul 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.2-3
082f9c
- Fix scipy build on python-2.7
082f9c
082f9c
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-2
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
082f9c
082f9c
* Thu Jul 1 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.2-1
082f9c
- New upstream release
082f9c
082f9c
* Sun Apr 11 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.1-3
082f9c
- Bump for rebuild against numpy 1.3
082f9c
082f9c
* Thu Apr  1 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.1-2
082f9c
- Bump for rebuild against numpy 1.4.0
082f9c
082f9c
* Thu Dec 10 2009 Jon Ciesla <limb@jcomserv.net> - 0.7.1-1
082f9c
- Update to 0.7.1.
082f9c
082f9c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-5
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
082f9c
082f9c
* Sun Jun 14  2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-4
082f9c
- Fix for gcc34 weave blitz bug #505379
082f9c
082f9c
* Tue Apr 7  2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-3
082f9c
- Add f2py requires to prepared for numpy packaging split
082f9c
082f9c
* Sun Mar 1  2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-2
082f9c
- Patch for stsci image function syntax fix.
082f9c
082f9c
* Thu Feb 26 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-1
082f9c
- Update to final 0.7 release
082f9c
082f9c
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-0.3.b1
082f9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
082f9c
082f9c
* Mon Dec 15 2008 Deji Akingunola <dakingun@gmail.com> - 0.7.0-0.2.b1
082f9c
- Rebuild for atlas-3.8.2
082f9c
082f9c
* Mon Dec 01 2008  Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-0.1.b1
082f9c
- Update to latest beta which lists python 2.6 support
082f9c
082f9c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.6.0-8
082f9c
- Rebuild for Python 2.6
082f9c
082f9c
* Fri Oct 03 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-7
082f9c
- fix the stsci fix
082f9c
082f9c
* Thu Oct 02 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-6
082f9c
- include missing setup files for stsci module
082f9c
082f9c
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.6.0-5
082f9c
- Autorebuild for GCC 4.3
082f9c
082f9c
* Fri Jan 04 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-4
082f9c
- fix for egg-info file creation
082f9c
082f9c
* Wed Oct 03 2007 Jef Spaleta <jspaleta@gmail.com> - 0.6.0-3
082f9c
- include_dirs changes for ufsparse change in development
082f9c
082f9c
* Tue Oct 02 2007 Jef Spaleta <jspaleta@gmail.com> - 0.6.0-2
082f9c
- Fix licensing to match Fedora packaging guidance
082f9c
- Remove unnecessary library deps
082f9c
082f9c
* Tue Sep 25 2007 Jarrod Millman <millman@berkeley.edu> - 0.6.0-1
082f9c
- update to new upstream source
082f9c
- update Summary, License, Url, and description
082f9c
- added extra dependencies
082f9c
- remove symlink since Lib has been renamed scipy
082f9c
082f9c
* Tue Aug 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2.1-1
082f9c
- Update to new upstream source
082f9c
082f9c
* Tue Aug 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-3
082f9c
- fix licensing tag and bump for buildid rebuild
082f9c
082f9c
* Wed Apr 18 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2.2
082f9c
- go back to using gfortran now that numpy is patched
082f9c
082f9c
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2.1
082f9c
- minor correction for f77 usage
082f9c
082f9c
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2
082f9c
- revert to f77 due to issue with numpy in development
082f9c
082f9c
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-1.1
082f9c
- remove arch specific optimizations
082f9c
082f9c
* Wed Feb 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-1
082f9c
- Update for new upstream release
082f9c
082f9c
* Mon Dec  11 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-5
082f9c
- Bump for rebuild against python 2.5 in devel tree
082f9c
082f9c
* Sun Dec  3 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-4
082f9c
- Minor adjustments to specfile for packaging guidelines.
082f9c
- Changed buildrequires fftw version 3  from fftw2
082f9c
082f9c
* Sat Dec  2 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-2
082f9c
- Updated spec for FE Packaging Guidelines and for upstream version 0.5.1
082f9c
082f9c
* Mon May  8 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-4
082f9c
- Add BuildRequires gcc-c++
082f9c
- Add python-devel
082f9c
- Add libstdc++
082f9c
082f9c
* Mon May  8 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-3
082f9c
- Add BuildRequires gcc-gfortran
082f9c
082f9c
* Sun May  7 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-3
082f9c
- Add BuildRequires numpy
082f9c
082f9c
082f9c
* Wed May  3 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-2
082f9c
- Fix BuildRoot
082f9c
- Add BuildRequires, Requires
082f9c
- Test remove d1mach patch
082f9c
- Fix defattr
082f9c
- Add changelog
082f9c
- Removed Prefix, Vendor
082f9c
- Fix Source0
082f9c