From ceaee1fac13738c1fd150354c212277fa5e8dedf Mon Sep 17 00:00:00 2001 From: Sergio Pascual Date: Sep 30 2016 14:16:22 +0000 Subject: Fix wrong provides of python3-astropy in python2-astropy (bz #1380135) * Fix falling test (https://github.com/astropy/astropy/pull/5203) --- diff --git a/2b363d2b1fb4c897fecedda563fb396d7c1bc6ec.patch b/2b363d2b1fb4c897fecedda563fb396d7c1bc6ec.patch new file mode 100644 index 0000000..37ad7ff --- /dev/null +++ b/2b363d2b1fb4c897fecedda563fb396d7c1bc6ec.patch @@ -0,0 +1,26 @@ +From 886bcb218e71ae95a63947ee95c0dc1bb0946750 Mon Sep 17 00:00:00 2001 +From: Ze Vinicius +Date: Thu, 28 Jul 2016 06:42:11 -0300 +Subject: [PATCH] fixes test circmean against scipy + +--- + astropy/stats/tests/test_circstats.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/astropy/stats/tests/test_circstats.py b/astropy/stats/tests/test_circstats.py +index c1c3c06..b30b074 100644 +--- a/astropy/stats/tests/test_circstats.py ++++ b/astropy/stats/tests/test_circstats.py +@@ -40,8 +40,10 @@ def test_circmean(): + @pytest.mark.skipif('not HAS_SCIPY') + def test_circmean_against_scipy(): + # testing against scipy.stats.circmean function +- data = np.random.uniform(-np.pi, np.pi, size=(100, 5)) +- answer = scipy.stats.circmean(data, np.pi, -np.pi) ++ # the data is the same as the test before, but in radians ++ data = np.array([0.89011792, 1.1693706, 0.6981317, 1.90240888, 0.54105207, ++ 6.24827872]) ++ answer = scipy.stats.circmean(data) + assert_equal(np.around(answer, 2), np.around(circmean(data), 2)) + + diff --git a/python-astropy.spec b/python-astropy.spec index 4cd1e41..210a985 100644 --- a/python-astropy.spec +++ b/python-astropy.spec @@ -8,7 +8,7 @@ Name: python-astropy Version: 1.2.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Community Python Library for Astronomy License: BSD @@ -19,6 +19,9 @@ Source2: astropy-ply.py Patch0: python-astropy-system-configobj.patch Patch1: python-astropy-system-pytest.patch Patch2: python-astropy-system-six.patch +# Fix problem with test 'test_circmean_against_scipy' +# https://github.com/astropy/astropy/pull/5203 +Patch3: https://github.com/astropy/astropy/commit/2b363d2b1fb4c897fecedda563fb396d7c1bc6ec.patch BuildRequires: python2-devel %if 0%{?with_python3} @@ -108,7 +111,7 @@ Requires: python%{python3_pkgversion}-h5py Requires: python%{python3_pkgversion}-PyYAML Requires: /usr/bin/xmllint -%{?python_provide:%python_provide python2-%{srcname}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} Provides: bundled(jquery) = 1.11 %description -n python%{python3_pkgversion}-%{srcname} @@ -124,7 +127,7 @@ Summary: Documentation for %{name}, includes full API docs # Disabled for the moment to avoid name collision # of generated names between arches # BuildArch: noarch -%{?python_provide:%python_provide python3-%{srcname}-doc} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}-doc} %description -n python%{python3_pkgversion}-%{srcname}-doc This package contains the full API documentation for %{name}. @@ -160,6 +163,7 @@ rm -rf astropy*egg-info %patch2 -p1 # Use system ply cp %{SOURCE2} astropy/extern/ply.py +%patch3 -p1 # Remove expat, erfa, cfitsio and wcslib rm -rf cextern/expat @@ -242,6 +246,9 @@ popd %endif # with_python3 %changelog +* Fri Sep 30 2016 Sergio Pascual - 1.2.1-3 +- Fix wrong provides of python3-astropy in python2-astropy (bz #1380135) + * Tue Jul 19 2016 Fedora Release Engineering - 1.2.1-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages