python-astropy/python-astropy.spec

317 lines
9.5 KiB
RPMSpec
Raw Normal View History

2014-01-16 13:15:15 +00:00
%global with_python3 1
%global upname astropy
Name: python-astropy
2014-09-25 09:40:40 +00:00
Version: 0.4.2
2014-12-05 09:31:17 +00:00
Release: 2%{?dist}
2014-01-16 13:15:15 +00:00
Summary: A Community Python Library for Astronomy
License: BSD
URL: http://astropy.org
Source0: http://pypi.python.org/packages/source/a/astropy/astropy-%{version}.tar.gz
Source1: astropy-README.dist
Source2: astropy-ply.py
2014-12-05 09:31:17 +00:00
Patch0: python-astropy-system-configobj.patch
Patch1: python-astropy-system-pytest.patch
Patch2: python-astropy-system-six.patch
Patch3: python-astropy-configobj5.patch
2014-01-16 13:15:15 +00:00
BuildRequires: python2-devel python-setuptools numpy
BuildRequires: scipy h5py
2014-05-23 14:39:42 +00:00
BuildRequires: git Cython pytest python-six python-ply
2014-01-16 13:15:15 +00:00
BuildRequires: python-sphinx graphviz
BuildRequires: python-matplotlib
BuildRequires: python-configobj
BuildRequires: expat-devel
BuildRequires: cfitsio-devel
BuildRequires: wcslib-devel >= 4.23
2014-01-16 13:15:15 +00:00
BuildRequires: erfa-devel
Requires: numpy
2014-05-23 14:39:42 +00:00
Requires: python-configobj pytest python-six python-ply
2014-01-16 13:15:15 +00:00
# Optionals
Requires: scipy h5py
Requires: /usr/bin/xmllint
2014-05-23 14:39:42 +00:00
Provides: bundled(jquery) = 1.10
2014-01-16 13:15:15 +00:00
%description
The Astropy project is a common effort to develop a single core package
for Astronomy. Major packages such as PyFITS, PyWCS, vo, and asciitable
already merged in, and many more components being worked on. In
particular, we are developing imaging, photometric, and spectroscopic
functionality, as well as frameworks for cosmology, unit handling, and
coordinate transformations.
%package doc
Summary: Documentation for %{name}, includes full API docs
# Disabled for the moment to avoid name collision
# of generated names between arches
# BuildArch: noarch
%description doc
This package contains the full API documentation for %{name}.
%if 0%{?with_python3}
%package -n python3-%{upname}
Summary: A Community Python Library for Astronomy
BuildRequires: python3-devel python3-setuptools python3-numpy
2014-05-23 14:39:42 +00:00
BuildRequires: git python3-Cython python3-pytest python3-six python3-ply
2014-01-16 13:15:15 +00:00
BuildRequires: python3-scipy python3-h5py
BuildRequires: python3-sphinx graphviz
BuildRequires: python3-matplotlib
BuildRequires: python3-configobj
#
BuildRequires: expat-devel
BuildRequires: wcslib-devel >= 4.23
2014-01-16 13:15:15 +00:00
BuildRequires: erfa-devel
BuildRequires: cfitsio-devel
BuildRequires: python3-devel
Requires: python3-numpy
Requires: python3-configobj
Requires: python3-pytest
2014-01-26 23:22:23 +00:00
Requires: python3-six
2014-05-23 14:39:42 +00:00
Requires: python3-ply
2014-01-16 13:15:15 +00:00
# Optionals
Requires: python3-scipy python3-h5py
Requires: /usr/bin/xmllint
2014-05-23 14:39:42 +00:00
Provides: bundled(jquery) = 1.10
2014-01-16 13:15:15 +00:00
%description -n python3-%{upname}
The Astropy project is a common effort to develop a single core package
for Astronomy. Major packages such as PyFITS, PyWCS, vo, and asciitable
already merged in, and many more components being worked on. In
particular, we are developing imaging, photometric, and spectroscopic
functionality, as well as frameworks for cosmology, unit handling, and
coordinate transformations.
%package -n python3-%{upname}-doc
Summary: Documentation for %{name}, includes full API docs
# Disabled for the moment to avoid name collision
# of generated names between arches
# BuildArch: noarch
%description -n python3-%{upname}-doc
This package contains the full API documentation for %{name}.
%endif # with_python3
%package -n %{upname}-tools
Summary: Astropy utility tools
BuildArch: noarch
Requires: python-%{upname} = %{version}-%{release}
%description -n %{upname}-tools
Utilities provided by Astropy: 'volint' for validating a Virtual Observatory
files, 'wcslint' for validating the WCS keywords in a FITS file.
%prep
%setup -qn %{upname}-%{version}
cp %{SOURCE1} README.dist
rm -rf astropy*egg-info
# Remove expat, erfa, cfitsio and wcslib
rm -rf cextern/expat
rm -rf cextern/erfa
rm -rf cextern/cfitsio
rm -rf cextern/wcslib
# Unbundle configobj
rm -rf astropy/extern/configobj*
2014-12-05 09:31:17 +00:00
%patch0 -p1
%patch3 -p1
2014-01-16 13:15:15 +00:00
# Unbundle pytest
rm -rf astropy/extern/pytest*
2014-12-05 09:31:17 +00:00
%patch1 -p1
2014-01-16 13:15:15 +00:00
# Unbundle six
2014-12-05 09:31:17 +00:00
%patch2 -p1
2014-01-16 13:15:15 +00:00
2014-05-23 14:39:42 +00:00
# Unbundle ply
rm -rf astropy/extern/ply*
cp %{SOURCE2} astropy/extern/ply.py
2014-01-16 13:15:15 +00:00
echo "[build]" >> setup.cfg
2014-12-05 09:31:17 +00:00
echo "use_system_libraries=1" >> setup.cfg
2014-01-16 13:15:15 +00:00
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3
%build
2014-12-05 09:31:17 +00:00
CFLAGS="%{optflags}" %{__python2} setup.py build --offline
%{__python2} setup.py build_sphinx --offline
2014-01-16 13:15:15 +00:00
rm -f docs/_build/html/.buildinfo
%if 0%{?with_python3}
pushd %{py3dir}
2014-12-05 09:31:17 +00:00
CFLAGS="%{optflags}" %{__python3} setup.py build --offline
2014-01-16 13:15:15 +00:00
# Not working, python3-sphinx bug
# https://bugzilla.redhat.com/show_bug.cgi?id=1014505
2014-12-05 09:31:17 +00:00
%{__python3} setup.py build_sphinx --offline
2014-01-16 13:15:15 +00:00
popd
# Copying the python2 docs for the moment
mkdir -p docs/_build3/
cp -r docs/_build/html docs/_build3/
%endif # with_python3
%install
%if 0%{?with_python3}
pushd %{py3dir}
2014-12-05 09:31:17 +00:00
%{__python3} setup.py install --skip-build --root %{buildroot} --offline
2014-01-16 13:15:15 +00:00
popd
%endif # with_python3
2014-12-05 09:31:17 +00:00
%{__python2} setup.py install --skip-build --root %{buildroot} --offline
2014-01-16 13:15:15 +00:00
find %{buildroot} -name "*.so" | xargs chmod 755
# install_scripts target seems to overwrite the shebang of the scripts
# it doesn't matter the the order of the installs
# fixing it here
for i in %{buildroot}/usr/bin/*; do
sed -i '1s|^#!%{__python3}|#!%{__python2}|' $i
done
%check
pushd %{buildroot}/%{python2_sitearch}
2014-12-05 09:31:17 +00:00
py.test-%{python2_version} -k "not test_web_profile" -x astropy
popd
2014-01-16 13:15:15 +00:00
%if 0%{?with_python3}
pushd %{buildroot}/%{python3_sitearch}
2014-12-05 09:31:17 +00:00
py.test-%{python3_version} -k "not test_web_profile" -x astropy
2014-01-16 13:15:15 +00:00
popd
%endif # with_python3
%files
%doc README.rst README.dist licenses/LICENSE.rst
%{python2_sitearch}/*
%files -n %{upname}-tools
%{_bindir}/*
# These two are provided by pyfits
%exclude %{_bindir}/fitsdiff
%exclude %{_bindir}/fitscheck
%files doc
%doc README.rst README.dist licenses/LICENSE.rst docs/_build/html
%if 0%{?with_python3}
%files -n python3-%{upname}
%doc README.rst licenses/LICENSE.rst README.dist
%{python3_sitearch}/*
%files -n python3-%{upname}-doc
%doc README.rst README.dist licenses/LICENSE.rst docs/_build3/html
%endif # with_python3
%changelog
2014-12-05 09:31:17 +00:00
* Fri Dec 05 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.4.2-2
- Fix to use configobj 5
- Patches reorganized
2014-09-25 09:40:40 +00:00
* Thu Sep 25 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.4.2-1
- New upstream (0.4.2)
* Mon Sep 01 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.4.1-1
- New upstream (0.4.1)
- Unbundling patches modified
- No checks for the moment
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-27 17:54:05 +00:00
* Tue May 27 2014 Orion Poplawski <orion@cora.nwra.com> - 0.3.2-5
- Rebuild for Python 3.4
* Thu May 22 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.2-4
- Build with wcslib 4.23
- Skip test, bug 2171
2014-05-23 14:39:42 +00:00
* Thu May 22 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.2-3
- Astropy bundles jquery
- Unbundle plpy
2014-05-22 08:32:16 +00:00
* Thu May 22 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.2-2
- Add missing patches
* Mon May 19 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.2-1
- New upstream (0.3.2)
- Enable checks
- Patch to fix upstream bug 2171
- Disable proplematic test (2516)
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Tue Mar 25 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.1-2
- Disable checks until https://github.com/astropy/astropy/issues/2171 is fixed
- Patch to fix https://github.com/astropy/astropy/pull/2223
* Wed Mar 05 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.1-1
- New upstream version (0.3.1)
- Remove require python(3)-matplotlib-qt4 (bug #1030396 fixed)
- Run the tests on the installed files
- Add patch to run with six 1.5.x
2014-01-26 23:22:23 +00:00
* Mon Jan 27 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-7
- Add missing requires python3-six
* Sat Jan 18 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-6
- Do not exclude hidden file, it breaks tests
* Thu Jan 16 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-5
- Remove split -devel subpackage, it does not make much sense
2014-01-16 13:15:15 +00:00
* Fri Jan 10 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-4
- Disable noarch for doc subpackages to avoid name colision
* Fri Jan 10 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-3
- Enable HDF5 version check (fixed in h5py)
- Patch for failing test with wcslib 4.20
- Require python(3)-matplotlib-qt4 due to bug #1030396
* Sun Jan 05 2014 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-2
- Disable HDF5 version check
* Mon Nov 25 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-1
- New upstream (0.3)
* Tue Nov 19 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-0.3.rc1
- New upstream, first release candidate Testing 0.3rc1
* Wed Nov 06 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-0.2.b1
- Split utility scripts in subpackage
* Tue Nov 05 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3-0.1.b1
- Testing 0.3 (0.3b1)
* Mon Oct 28 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.5-1
- New upstream version (0.2.5)
* Tue Oct 22 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.4-4
- Split header files into devel subpackages
* Mon Oct 21 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.4-3
- Disable tests in Rawhide
* Thu Oct 10 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.4-3
- Add a patch to build with cfitsio 3.35
* Wed Oct 02 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.4-1
- Initial spec