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