RHEL: Convert from Fedora for the Python 3.11 stack in RHEL

Resolves: rhbz#2157723
This commit is contained in:
Charalampos Stratakis 2022-12-01 02:30:29 +01:00
parent 47c9ab3757
commit d384cbdb91
2 changed files with 213 additions and 578 deletions

View File

@ -1,15 +1,10 @@
# without means enabled %global __python3 /usr/bin/python3.11
%bcond_with doc %global python3_pkgversion 3.11
# Pythran is an optional build dependency. # Pythran is an optional build dependency.
# When used, it makes some modules faster, # When used, it makes some modules faster,
# but it is usually not available soon enough for new major Python versions. # but it is usually not available soon enough for new major Python versions.
%ifarch i686 || armv7hl
# It seems pythran is broken on 32-bit arches, disable it
%bcond_with pythran %bcond_with pythran
%else
%bcond_without pythran
%endif
# Set to pre-release version suffix if building pre-release, else %%{nil} # Set to pre-release version suffix if building pre-release, else %%{nil}
%global rcver %{nil} %global rcver %{nil}
@ -22,10 +17,12 @@
%global blasvar p %global blasvar p
%endif %endif
%global modname scipy
Summary: Scientific Tools for Python Summary: Scientific Tools for Python
Name: scipy Name: python%{python3_pkgversion}-scipy
Version: 1.8.1 Version: 1.8.1
Release: 6%{?dist} Release: 1%{?dist}
# BSD -- whole package except: # BSD -- whole package except:
# Boost -- scipy/special/cephes/scipy_iv.c # Boost -- scipy/special/cephes/scipy_iv.c
@ -37,30 +34,28 @@ Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%
# https://github.com/scipy/scipy/issues/16527 # https://github.com/scipy/scipy/issues/16527
# https://github.com/scipy/scipy/pull/16528 # https://github.com/scipy/scipy/pull/16528
Patch0: scipy-1.8.1-syevr-operator-order-explicit.patch Patch0: scipy-1.8.1-syevr-operator-order-explicit.patch
# Fix test_moments failing test
# https://github.com/scipy/scipy/pull/16593
Patch1: scipy-1.8.1-test_moments-benchmark.patch
BuildRequires: fftw-devel, suitesparse-devel BuildRequires: fftw-devel, suitesparse-devel
BuildRequires: %{blaslib}-devel BuildRequires: %{blaslib}-devel
BuildRequires: gcc-gfortran, swig, gcc-c++ BuildRequires: gcc-gfortran, swig, gcc-c++
BuildRequires: qhull-devel BuildRequires: qhull-devel
BuildRequires: pybind11-devel BuildRequires: python%{python3_pkgversion}-pybind11-devel
BuildRequires: python3-pybind11 >= 2.4.0 BuildRequires: python%{python3_pkgversion}-pybind11 >= 2.4.0
BuildRequires: python3-numpy, python3-devel, python3-numpy-f2py BuildRequires: python%{python3_pkgversion}-numpy, python%{python3_pkgversion}-devel, python%{python3_pkgversion}-numpy-f2py
BuildRequires: python3-setuptools BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python3-Cython BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-pytest BuildRequires: python%{python3_pkgversion}-Cython
BuildRequires: python3-pytest-xdist BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python3-pytest-timeout
%if %{with pythran} %if %{with pythran}
BuildRequires: pythran BuildRequires: pythran
%endif %endif
%if %{with doc} Requires: python%{python3_pkgversion}-numpy, python%{python3_pkgversion}-f2py
BuildRequires: python3-sphinx
BuildRequires: python3-matplotlib
BuildRequires: python3-numpydoc
%endif
%global _description %{expand: %global _description %{expand:
Scipy is open-source software for mathematics, science, and Scipy is open-source software for mathematics, science, and
@ -75,23 +70,8 @@ leading scientists and engineers.}
%description %_description %description %_description
%package -n python3-scipy
Summary: Scientific Tools for Python
Requires: python3-numpy, python3-f2py
%{?python_provide:%python_provide python3-scipy}
%description -n python3-scipy %_description
%if %{with doc}
%package -n python3-scipy-doc
Summary: Scientific Tools for Python - documentation
Requires: python3-scipy = %{version}-%{release}
%description -n python3-scipy-doc
HTML documentation for Scipy
%endif
%prep %prep
%autosetup -p1 -n %{name}-%{version}%{?rcver} %autosetup -p1 -n %{modname}-%{version}%{?rcver}
cat > site.cfg << EOF cat > site.cfg << EOF
[amd] [amd]
@ -109,43 +89,26 @@ libraries = %{blaslib}%{blasvar}
library_dirs = %{_libdir} library_dirs = %{_libdir}
EOF EOF
# Docs won't build unless the .dat files are specified here
sed -i 's/metadata = dict(/metadata = dict(package_data={"": ["*.dat"]},/' setup.py
# remove bundled numpydoc
rm doc/sphinxext -r
rm $(grep -rl '/\* Generated by Cython') PKG-INFO rm $(grep -rl '/\* Generated by Cython') PKG-INFO
%build %build
export SCIPY_USE_PYTHRAN=0%{?with_pythran} export SCIPY_USE_PYTHRAN=0%{?with_pythran}
for PY in %{python3_version}; do for PY in %{python3_pkgversion}; do
# Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611 # Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611
env CFLAGS="$RPM_OPT_FLAGS -lm" \ env CFLAGS="$RPM_OPT_FLAGS -lm" \
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 FFLAGS="$RPM_OPT_FLAGS -fPIC -cpp" \
FFLAGS="$RPM_OPT_FLAGS -fPIC -fallow-argument-mismatch" \ LDFLAGS="$RPM_LD_FLAGS -shared" \
%else %if 0%{?rhel} >= 9
FFLAGS="$RPM_OPT_FLAGS -fPIC" \
%endif
%ifarch x86_64 %ifarch x86_64
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2068530 # workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2068530
LDFLAGS="%{__global_ldflags} -Wl,--no-as-needed -lmvec -Wl,--as-needed" \ LDFLAGS="%{__global_ldflags} -Wl,--no-as-needed -lmvec -Wl,--as-needed" \
%else %endif
LDFLAGS="%{__global_ldflags}" \
%endif %endif
%{_bindir}/python$PY setup.py config_fc \ %{_bindir}/python$PY setup.py config_fc \
--fcompiler=gnu95 --noarch \ --fcompiler=gnu95 --noarch \
build build
%if %{with doc}
pushd doc
export PYTHONPATH=$(echo ../build/lib.linux-*-$PY/)
make html SPHINXBUILD=sphinx-build-$PY
rm -rf build/html/.buildinfo
mv build build-$PY
popd
%endif
done done
%install %install
@ -194,530 +157,52 @@ export PYTEST_ADDOPTS="-k 'not TestSchur and not test_sygst and not test_cython_
%endif %endif
pushd %{buildroot}/%{python3_sitearch} pushd %{buildroot}/%{python3_sitearch}
%{pytest} --timeout=${TIMEOUT} scipy --numprocesses=auto %{pytest} scipy
# Remove test remnants # Remove test remnants
rm -rf gram{A,B} rm -rf gram{A,B}
popd popd
%files -n python3-scipy %files -n python%{python3_pkgversion}-scipy
%doc LICENSE.txt %doc LICENSE.txt
%{python3_sitearch}/scipy/ %{python3_sitearch}/scipy/
%{python3_sitearch}/*.egg-info %{python3_sitearch}/*.egg-info
%if %{with doc}
%files -n python3-scipy-doc
%license LICENSE.txt
%doc doc/build-%{python3_version}/html
%endif
%changelog %changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-6 * Thu Dec 01 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.8.1-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Initial package
- Fedora contributions by:
* Sun Jul 3 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.8.1-5 Antonio Trande <anto.trande@gmail.com>
- Fix linalg.lapack syevr segfault (#2099102) Bill Nottingham <notting@fedoraproject.org>
Björn Esser <me@besser82.io>
* Fri Jun 17 2022 Python Maint <python-maint@redhat.com> - 1.8.1-4 Charalampos Stratakis <cstratak@redhat.com>
- Rebuilt for Python 3.11 Christian Dersch <lupinix@mailbox.org>
David Malcolm <dmalcolm@redhat.com>
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-3 Deji Akingunola <deji@fedoraproject.org>
- Bootstrap for Python 3.11 Dennis Gilmore <dennis@ausil.us>
Elliott Sales de Andrade <quantum.analyst@gmail.com>
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-2 Ignacio Vazquez-Abrams <ivazquez@fedoraproject.org>
- Rebuilt for Python 3.11 Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Iñaki Úcar <iucar@fedoraproject.org>
* Thu Jun 09 2022 Nikola Forró <nforro@redhat.com> - 1.8.1-1 Jef Spaleta <jspaleta@fedoraproject.org>
- New upstream release 1.8.1 Jesse Keating <jkeating@fedoraproject.org>
resolves: #2088437 Jitka Plesnikova <jplesnik@redhat.com>
Jonathan Wakely <jwakely@redhat.com>
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-3 Jon Ciesla <limb@fedoraproject.org>
- Skip test_cython_api also on armv7hl Kalev Lember <klember@redhat.com>
Kevin Fenzi <kevin@scrye.com>
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-2 Lumir Balhar <lbalhar@redhat.com>
- Disable pythran on armv7hl as well Mamoru TASAKA <mtasaka@fedoraproject.org>
Marcel Plch <mplch@redhat.com>
* Mon Feb 07 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-1 Miro Hrončok <miro@hroncok.cz>
- New upstream release 1.8.0 Nikola Forró <nforro@redhat.com>
resolves: #2035126 Nils Philippsen <nils@redhat.com>
Orion Poplawski <orion@nwra.com>
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-2 Peter Robinson <pbrobinson@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Petr Viktorin <pviktori@redhat.com>
Robert Kuska <rkuska@redhat.com>
* Tue Dec 21 2021 Nikola Forró <nforro@redhat.com> - 1.7.3-1 Than Ngo <than@redhat.com>
- New upstream release 1.7.3 Thomas Spura <thomas.spura@gmail.com>
resolves: #1988883 Tomas Tomecek <ttomecek@redhat.com>
Toshio Kuratomi <toshio@fedoraproject.org>
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3 Troy Dawson <tdawson@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
* Wed Jul 14 2021 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-2
- Use the optional Pythran build dependency
* Wed Jun 23 2021 Nikola Forró <nforro@redhat.com> - 1.7.0-1
- New upstream release 1.7.0
resolves: #1953422
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.2-4
- Rebuilt for Python 3.10
* Fri Apr 23 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-3
- Remove RPATH from certain shared object files
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 1.6.2-2
- Rebuilt for removed libstdc++ symbol (#1937698)
* Thu Mar 25 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-1
- New upstream release 1.6.2
resolves: #1942896
* Thu Feb 18 2021 Nikola Forró <nforro@redhat.com> - 1.6.1-1
- New upstream release 1.6.1
resolves: #1929994
* Wed Feb 03 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-3
- Increase test timeout on s390x
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-1
- New upstream release 1.6.0
resolves: #1906692
* Wed Nov 25 2020 Nikola Forró <nforro@redhat.com> - 1.5.4-2
- Skip factorial() float tests on Python 3.10
resolves: #1898157
* Thu Nov 05 2020 Nikola Forró <nforro@redhat.com> - 1.5.4-1
- New upstream release 1.5.4
- Increase test timeout, 300 seconds is not always enough
for test_logpdf_overflow on s390x
resolves: #1894887
* Mon Oct 19 2020 Nikola Forró <nforro@redhat.com> - 1.5.3-1
- New upstream release 1.5.3
resolves: #1889132
* Wed Sep 30 2020 Nikola Forró <nforro@redhat.com> - 1.5.2-2
- Skip one more test expected to fail on 32-bit architectures
* Mon Aug 31 2020 Nikola Forró <nforro@redhat.com> - 1.5.2-1
- New upstream release 1.5.2
resolves: #1853871 and #1840077
* Sun Aug 16 2020 Iñaki Úcar <iucar@fedoraproject.org> - 1.5.0-4
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 23 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.5.0-1
- Update to latest version
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.1-2
- Rebuilt for Python 3.9
* Sun Mar 01 2020 Orion Poplawski <orion@nwra.com> - 1.4.1-1
- Update to 1.4.1 (bz#1771154)
- Workaround FTBFS with gcc 10 (bz#1800078)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Oct 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.1-1
- Update to 1.3.1 (#1674101)
- Drop Python 2 packages (not supported by SciPy >= 1.3)
- Backported upstream patch for cKDTree (fixes FTBFS)
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-8
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.1-7
- Rebuilt for Python 3.8
* Tue Jul 30 2019 Petr Viktorin <pviktori@redhat.com> - 1.2.1-6
- Remove build dependency on python2-pytest-xdist and python2-pytest-timeout
- Enable parallel tests in Python 3 %%check
- Use macros for Python interpreter in tests
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jun 10 2019 Marcel Plch <mplch@redhat.com> - 1.2.1-4
- Fix FTBFS with Py3.8 (#1606315)
* Thu May 16 2019 Orion Poplawski <orion@nwra.com> - 1.2.1-3
- Build only against openblasp (bugz#1709161)
* Fri Apr 26 2019 Orion Poplawski <orion@nwra.com> - 1.2.1-2
- Do not create *-PYTEST.pyc files
* Tue Apr 23 2019 Orion Poplawski <orion@nwra.com> - 1.2.1-1
- Update to 1.2.1
- Drop scipy2-doc
* Wed Feb 06 2019 Charalampos Stratakis <cstratak@redhat.com> - 1.2.0-1
- Update to 1.2.0
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 23 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-2
- Don't ignore the tests results but rather have a tolerance rate
- Skip test_decomp on ppc64le as it currently segfaults
* Fri Jun 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-1
- Update to 1.1.0 (#1560265, #1594355)
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-8
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 02 2018 Petr Viktorin <pviktori@redhat.com> - 1.0.0-6
- Link with -lm to build with new stricter Fedora flags
https://bugzilla.redhat.com/show_bug.cgi?id=1541416
* Wed Jan 31 2018 Christian Dersch <lupinix@mailbox.org> - 1.0.0-5
- rebuilt for GCC 8.x (gfortran soname bump)
* Mon Dec 11 2017 Lumír Balhar <lbalhar@redhat.com> - 1.0.0-4
- Disable tests on s390x
* Mon Nov 20 2017 Lumír Balhar <lbalhar@redhat.com> - 1.0.0-3
- New subpackages with HTML documentation
* Tue Oct 31 2017 Christian Dersch <lupinix@mailbox.org> - 1.0.0-2
- Use openblas where available https://fedoraproject.org/wiki/Changes/OpenBLAS_as_default_BLAS
- Remove ppc64 hackery for OpenBLAS
- Don't run tests in parallel as pytest crashes
- Don't run test_denormals as it tends to stuck
* Thu Oct 26 2017 Thomas Spura <tomspur@fedoraproject.org> - 1.0.0-1
- update to 1.0.0 and use pytest instead of nose
- use timeout during parallel %%check
* Wed Oct 04 2017 Christian Dersch <lupinix@mailbox.org> - 0.19.1-5
- Use openblas where available (except ppc64), to use same as numpy (BZ 1472318)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.19.1-2
- Rebuild due to bug in RPM (RHBZ #1468476)
* Tue Jun 27 2017 Christian Dersch <lupinix@mailbox.org> - 0.19.1-1
- new version
* Wed Jun 07 2017 Christian Dersch <lupinix@mailbox.org> - 0.19.0-1
- new version
* Tue Jan 31 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.18.0-3
- Rebuild for libgfortran.so.3
* Mon Dec 12 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.18.0-2
- Rebuild for Python 3.6
* Tue Jul 26 2016 Than Ngo <than@redhat.com> - 0.18.0-1
- 0.18.0
- %%check: make non-fatal as temporary workaround for scipy build on arm
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17.0-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Tue May 31 2016 Nils Philippsen <nils@redhat.com>
- fix source URL
* Mon Feb 15 2016 Orion Poplawski <orion@cora.nwra.com> - 0.17.0-1
- Update to 0.17.0
- Drop ctypes patch applied upstream
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Nov 21 2015 Kalev Lember <klember@redhat.com> - 0.16.1-6
- Add provides to satisfy scipy%%{_isa} requires in other packages
* Sun Nov 15 2015 Björn Esser <fedora@besser82.io> - 0.16.1-5
- Revert "Discard results of testsuite on %%{arm} for now"
* Sat Nov 14 2015 Björn Esser <besser82@fedoraproject.org> - 0.16.1-4
- Discard results of testsuite on %%{arm} for now
Segfaults on non-aligned memory test (expected for arm)
* Sat Nov 14 2015 Thomas Spura <tomspur@fedoraproject.org> - 0.16.1-3
- Add patch to fix ctypes test
- Move requires to correct python2 subpackage
- Add FFLAGS also in %%install
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Mon Oct 26 2015 Orion Poplawski <orion@cora.nwra.com> - 0.16.1-1
- Update to 0.16.1
* Wed Oct 14 2015 Thomas Spura <tomspur@fedoraproject.org> - 0.16.0-1
- Update to 0.16.0
- Use python_provide macro
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Mar 31 2015 Orion Poplawski <orion@cora.nwra.com> - 0.15.1-1
- Update to 0.15.1
* Sun Jan 4 2015 Orion Poplawski <orion@cora.nwra.com> - 0.14.1-1
- Update to 0.14.1
* Wed Aug 20 2014 Kevin Fenzi <kevin@scrye.com> - 0.14.0-5
- Rebuild for rpm bug 1131892
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat May 10 2014 Orion Poplawski <orion@cora.nwra.com> - 0.14-2
- Rebuild with Python 3.4
* Tue May 6 2014 Orion Poplawski <orion@cora.nwra.com> - 0.14-1
- Update to 0.14
- Do not use system python-six (bug #1046817)
* Thu Feb 20 2014 Thomas Spura <tomspur@fedoraproject.org> - 0.13.3-2
- use python2 macros everywhere (Requested by Han Boetes)
* Tue Feb 4 2014 Thomas Spura <tomspur@fedoraproject.org> - 0.13.3-1
- Update to 0.13.3
* Mon Dec 9 2013 Orion Poplwski <orion@cora.nwra.com> - 0.13.2-1
- Update to 0.13.2
* Fri Dec 06 2013 Nils Philippsen <nils@redhat.com> - 0.13.1-2
- rebuild (suitesparse)
* Sun Nov 17 2013 Orion Poplwski <orion@cora.nwra.com> - 0.13.1-1
- Update to 0.13.1
* Wed Oct 23 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.13.0-2
- Update to 0.13.0 final
* Tue Oct 15 2013 Orion Poplwski <orion@cora.nwra.com> - 0.13.0-0.4.rc1
- Update to 0.13.0rc1
* Tue Oct 01 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.13.0-0.3.b1
- rebuilt with atlas 3.10
* Mon Sep 9 2013 Orion Poplwski <orion@cora.nwra.com> - 0.13.0-0.2.b1
- Unbundle python-six (bug #1005350)
* Thu Aug 29 2013 Orion Poplwski <orion@cora.nwra.com> - 0.13.0-0.1.b1
- Update to 0.13.0b1
- Drop patches applied upstream
- Fixup changelog and summary
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 30 2013 Tomas Tomecek <ttomecek@redhat.com> - 0.12.0-4
- Fix rpmlint warnings
- License update
- Add patch to use build_dir argument in build_extension
* Wed May 15 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-3
- Remove old ufsparse references, use suitesparse
- Spec cleanup
* Mon Apr 15 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-2
- Add patch to fix segfaul in test of sgeqrf
* Wed Apr 10 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-1
- Update to 0.12.0 final
- No longer remove weave from python3 build
* Sat Feb 16 2013 Orion Poplawski <orion@cora.nwra.com> - 0.12.0-0.1.b1
- Update to 0.12.0b1
- Drop upstreamed linalg patch
* 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
* Mon Oct 8 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-2
- Add requires python3-numpy, python3-f2py for python3-scipy (bug 863755)
* Sun Sep 30 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-1
- Update to 0.11.0 final
* Thu Aug 23 2012 Orion Poplawski <orion@cora.nwra.com> - 0.11.0-0.1.rc2
- Update to 0.11.0rc2
* Mon Aug 6 2012 Orion Poplawski <orion@cora.nwra.com> - 0.10.1-4
- Rebuild for python 3.3
* Fri Aug 3 2012 David Malcolm <dmalcolm@redhat.com> - 0.10.1-3
- remove rhel logic from with_python3 conditional
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Mar 16 2012 Orion Poplawski <orion@cora.nwra.com> - 0.10.1-1
- Update to 0.10.1
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Nov 14 2011 Orion Poplawski <orion@cora.nwra.com> - 0.10.0-1
- Update to 0.10.0
* Sat Sep 3 2011 Thomas Spura <tomspur@fedoraproject.org> - 0.9.0-2
- little cosmetic changes
- filter provides in python_sitearch
* Fri Sep 02 2011 Andrew McNabb <amcnabb@mcnabbs.org>
- add python3 subpackage
* Fri Apr 1 2011 Orion Poplawski <orion@cora.nwra.com> - 0.9.0-1
- Update to 0.9.0
- Drop all stsci sources and patches, dropped from upstream
- Drop gcc and py27 patches fixed upstream
- Add %%check section to run tests
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Jul 31 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.2-3
- Fix scipy build on python-2.7
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Thu Jul 1 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.2-1
- New upstream release
* Sun Apr 11 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.1-3
- Bump for rebuild against numpy 1.3
* Thu Apr 1 2010 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.1-2
- Bump for rebuild against numpy 1.4.0
* Thu Dec 10 2009 Jon Ciesla <limb@jcomserv.net> - 0.7.1-1
- Update to 0.7.1.
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sun Jun 14 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-4
- Fix for gcc34 weave blitz bug #505379
* Tue Apr 7 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-3
- Add f2py requires to prepared for numpy packaging split
* Sun Mar 1 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-2
- Patch for stsci image function syntax fix.
* Thu Feb 26 2009 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-1
- Update to final 0.7 release
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-0.3.b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 15 2008 Deji Akingunola <dakingun@gmail.com> - 0.7.0-0.2.b1
- Rebuild for atlas-3.8.2
* Mon Dec 01 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.7.0-0.1.b1
- Update to latest beta which lists python 2.6 support
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.6.0-8
- Rebuild for Python 2.6
* Fri Oct 03 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-7
- fix the stsci fix
* Thu Oct 02 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-6
- include missing setup files for stsci module
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.6.0-5
- Autorebuild for GCC 4.3
* Fri Jan 04 2008 Jef Spaleta <jspaleta@fedoraproject.org> - 0.6.0-4
- fix for egg-info file creation
* Wed Oct 03 2007 Jef Spaleta <jspaleta@gmail.com> - 0.6.0-3
- include_dirs changes for ufsparse change in development
* Tue Oct 02 2007 Jef Spaleta <jspaleta@gmail.com> - 0.6.0-2
- Fix licensing to match Fedora packaging guidance
- Remove unnecessary library deps
* Tue Sep 25 2007 Jarrod Millman <millman@berkeley.edu> - 0.6.0-1
- update to new upstream source
- update Summary, License, Url, and description
- added extra dependencies
- remove symlink since Lib has been renamed scipy
* Tue Aug 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2.1-1
- Update to new upstream source
* Tue Aug 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-3
- fix licensing tag and bump for buildid rebuild
* Wed Apr 18 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2.2
- go back to using gfortran now that numpy is patched
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2.1
- minor correction for f77 usage
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-2
- revert to f77 due to issue with numpy in development
* Sat Apr 14 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-1.1
- remove arch specific optimizations
* Wed Feb 21 2007 Jef Spaleta <jspaleta@gmail.com> - 0.5.2-1
- Update for new upstream release
* Mon Dec 11 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-5
- Bump for rebuild against python 2.5 in devel tree
* Sun Dec 3 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-4
- Minor adjustments to specfile for packaging guidelines.
- Changed buildrequires fftw version 3 from fftw2
* Sat Dec 2 2006 Jef Spaleta <jspaleta@gmail.com> - 0.5.1-2
- Updated spec for FE Packaging Guidelines and for upstream version 0.5.1
* Mon May 8 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-4
- Add BuildRequires gcc-c++
- Add python-devel
- Add libstdc++
* Mon May 8 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-3
- Add BuildRequires gcc-gfortran
* Sun May 7 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-3
- Add BuildRequires numpy
* Wed May 3 2006 Neal Becker <ndbecker2@gmail.com> - 0.4.8-2
- Fix BuildRoot
- Add BuildRequires, Requires
- Test remove d1mach patch
- Fix defattr
- Add changelog
- Removed Prefix, Vendor
- Fix Source0

View File

@ -0,0 +1,150 @@
diff --git a/benchmarks/benchmarks/stats.py b/benchmarks/benchmarks/stats.py
index 0f105b39..ed399f4d 100644
--- a/benchmarks/benchmarks/stats.py
+++ b/benchmarks/benchmarks/stats.py
@@ -162,6 +162,33 @@ class InferentialStats(Benchmark):
stats.mstats.kruskal(self.a, self.b)
+# Benchmark data for the truncnorm stats() method.
+# The data in each row is:
+# a, b, mean, variance, skewness, excess kurtosis. Generated using
+# https://gist.github.com/WarrenWeckesser/636b537ee889679227d53543d333a720
+truncnorm_cases = [[-20, -19, -19.052343945976656, 0.002725073018195613,
+ -1.9838693623377885, 5.871801893091683],
+ [-30, -29, -29.034401237736176, 0.0011806604886186853,
+ -1.9929615171469608, 5.943905539773037],
+ [-40, -39, -39.02560741993011, 0.0006548827702932775,
+ -1.9960847672775606, 5.968744357649675],
+ [39, 40, 39.02560741993011, 0.0006548827702932775,
+ 1.9960847672775606, 5.968744357649675]]
+truncnorm_cases = np.array(truncnorm_cases)
+
+
+class TruncnormStats(Benchmark):
+ param_names = ['case', 'moment']
+ params = [list(range(len(truncnorm_cases))), ['m', 'v', 's', 'k']]
+
+ def track_truncnorm_stats_error(self, case, moment):
+ result_indices = dict(zip(['m', 'v', 's', 'k'], range(2, 6)))
+ ref = truncnorm_cases[case, result_indices[moment]]
+ a, b = truncnorm_cases[case, 0:2]
+ res = stats.truncnorm(a, b).stats(moments=moment)
+ return np.abs((res - ref)/ref)
+
+
class DistributionsAll(Benchmark):
# all distributions are in this list. A conversion to a set is used to
# remove duplicates that appear more than once in either `distcont` or
diff --git a/scipy/stats/tests/test_distributions.py b/scipy/stats/tests/test_distributions.py
index d18ad6f3..a15a9301 100644
--- a/scipy/stats/tests/test_distributions.py
+++ b/scipy/stats/tests/test_distributions.py
@@ -910,61 +910,52 @@ class TestTruncnorm:
assert_almost_equal(s, s0, decimal=decimal_s)
assert_almost_equal(k, k0)
- @pytest.mark.xfail_on_32bit("reduced accuracy with 32bit platforms.")
- def test_moments(self):
- # Values validated by changing TRUNCNORM_TAIL_X so as to evaluate
- # using both the _norm_XXX() and _norm_logXXX() functions, and by
- # removing the _stats and _munp methods in truncnorm tp force
- # numerical quadrature.
- # For m,v,s,k expect k to have the largest error as it is
- # constructed from powers of lower moments
-
- self._test_moments_one_range(-30, 30, [0, 1, 0.0, 0.0])
- self._test_moments_one_range(-10, 10, [0, 1, 0.0, 0.0])
- self._test_moments_one_range(-3, 3, [0.0, 0.9733369246625415,
- 0.0, -0.1711144363977444])
- self._test_moments_one_range(-2, 2, [0.0, 0.7737413035499232,
- 0.0, -0.6344632828703505])
-
- self._test_moments_one_range(0, np.inf, [0.7978845608028654,
- 0.3633802276324186,
- 0.9952717464311565,
- 0.8691773036059725])
- self._test_moments_one_range(-np.inf, 0, [-0.7978845608028654,
- 0.3633802276324186,
- -0.9952717464311565,
- 0.8691773036059725])
-
- self._test_moments_one_range(-1, 3, [0.2827861107271540,
- 0.6161417353578292,
- 0.5393018494027878,
- -0.2058206513527461])
- self._test_moments_one_range(-3, 1, [-0.2827861107271540,
- 0.6161417353578292,
- -0.5393018494027878,
- -0.2058206513527461])
-
- self._test_moments_one_range(-10, -9, [-9.1084562880124764,
- 0.0114488058210104,
- -1.8985607337519652,
- 5.0733457094223553])
- self._test_moments_one_range(-20, -19, [-19.0523439459766628,
- 0.0027250730180314,
- -1.9838694022629291,
- 5.8717850028287586])
- self._test_moments_one_range(-30, -29, [-29.0344012377394698,
- 0.0011806603928891,
- -1.9930304534611458,
- 5.8854062968996566],
- decimal_s=6)
- self._test_moments_one_range(-40, -39, [-39.0256074199326264,
- 0.0006548826719649,
- -1.9963146354109957,
- 5.6167758371700494])
- self._test_moments_one_range(39, 40, [39.0256074199326264,
- 0.0006548826719649,
- 1.9963146354109957,
- 5.6167758371700494])
+ # Test data for the truncnorm stats() method.
+ # The data in each row is:
+ # a, b, mean, variance, skewness, excess kurtosis. Generated using
+ # https://gist.github.com/WarrenWeckesser/636b537ee889679227d53543d333a720
+ _truncnorm_stats_data = [
+ [-30, 30,
+ 0.0, 1.0, 0.0, 0.0],
+ [-10, 10,
+ 0.0, 1.0, 0.0, -1.4927521335810455e-19],
+ [-3, 3,
+ 0.0, 0.9733369246625415, 0.0, -0.17111443639774404],
+ [-2, 2,
+ 0.0, 0.7737413035499232, 0.0, -0.6344632828703505],
+ [0, np.inf,
+ 0.7978845608028654,
+ 0.3633802276324187,
+ 0.995271746431156,
+ 0.8691773036059741],
+ [-np.inf, 0,
+ -0.7978845608028654,
+ 0.3633802276324187,
+ -0.995271746431156,
+ 0.8691773036059741],
+ [-1, 3,
+ 0.282786110727154,
+ 0.6161417353578293,
+ 0.5393018494027877,
+ -0.20582065135274694],
+ [-3, 1,
+ -0.282786110727154,
+ 0.6161417353578293,
+ -0.5393018494027877,
+ -0.20582065135274694],
+ [-10, -9,
+ -9.108456288012409,
+ 0.011448805821636248,
+ -1.8985607290949496,
+ 5.0733461105025075],
+ ]
+ _truncnorm_stats_data = np.array(_truncnorm_stats_data)
+
+ @pytest.mark.parametrize("case", _truncnorm_stats_data)
+ def test_moments(self, case):
+ a, b, m0, v0, s0, k0 = case
+ m, v, s, k = stats.truncnorm.stats(a, b, moments='mvsk')
+ assert_allclose([m, v, s, k], [m0, v0, s0, k0], atol=1e-17)
def test_9902_moments(self):
m, v = stats.truncnorm.stats(0, np.inf, moments='mv')