Reenable tests

- Handle changes regarding python3 and pyfits-tools in fedora >= 22
This commit is contained in:
Sergio Pascual 2015-07-15 12:55:43 +02:00
parent f788389311
commit e57cc8303d

View File

@ -5,7 +5,7 @@
Name: python-astropy
Version: 1.0.3
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A Community Python Library for Astronomy
License: BSD
@ -106,10 +106,14 @@ This package contains the full API documentation for %{name}.
%package -n %{upname}-tools
Summary: Astropy utility tools
BuildArch: noarch
%if 0%{?fedora} >= 22
Requires: python3-%{upname} = %{version}-%{release}
Obsoletes: pyfits-tools < 3.3-6
#
Provides: pyfits-tools
%else
Requires: python-%{upname} = %{version}-%{release}
%endif
%description -n %{upname}-tools
Utilities provided by Astropy
@ -159,27 +163,39 @@ cp -r %{py3dir}/docs/_build/html docs/_build3/
%endif # with_python3
%install
%if 0%{?with_python3}
%if 0%{?fedora} >= 22
%{__python2} setup.py install --skip-build --root %{buildroot} --offline
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot} --offline
popd
%endif # with_python3
%else
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot} --offline
popd
%endif # with_python3
%{__python2} setup.py install --skip-build --root %{buildroot} --offline
%endif # fedora >= 22
find %{buildroot} -name "*.so" | xargs chmod 755
%check
pushd %{buildroot}/%{python2_sitearch}
#py.test-%{python2_version} -k "not test_web_profile" astropy
py.test-%{python2_version} -k "not test_web_profile" astropy
popd
%if 0%{?with_python3}
pushd %{buildroot}/%{python3_sitearch}
#py.test-%{python3_version} -k "not test_web_profile" astropy
py.test-%{python3_version} -k "not test_web_profile" astropy
popd
%endif # with_python3
@ -190,6 +206,11 @@ popd
%files -n %{upname}-tools
%{_bindir}/*
%if 0%{?fedora} < 22
# These two are provided by pyfits
%exclude %{_bindir}/fitsdiff
%exclude %{_bindir}/fitscheck
%endif # fedora < 22
%files doc
%doc README.rst README.dist docs/_build/html
@ -208,6 +229,10 @@ popd
%endif # with_python3
%changelog
* Tue Jun 30 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 1.0.3-4
- Reenable tests
- Handle changes regarding python3 and pyfits-tools in fedora >= 22
* Mon Jun 29 2015 Sergio Pascual <sergiopr@fedoraproject.org> - 1.0.3-3
- Obsolete pyfits-tools (fixes bz #1236562)
- astropy-tools requires python3