/[packages]/cauldron/python-astropy/current/SPECS/python-astropy.spec
ViewVC logotype

Diff of /cauldron/python-astropy/current/SPECS/python-astropy.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1441171 by joequant, Fri Aug 23 17:57:21 2019 UTC revision 1441172 by tv, Sun Sep 15 11:57:34 2019 UTC
# Line 2  Line 2 
2  %global pypi_name astropy  %global pypi_name astropy
3  %global upname astropy  %global upname astropy
4    
 #version 3.* supports only python3. For this reason, upstream also  
 #maintains 2.* versionning to keep backward compatibility with python2  
 #until 2019 (but the packages differ, no new feature added in the 2  
 #branch). Let's put 3.* into python3- and 2.* into python2-  
   
5  %define         p2version    2.0.12  %define         p2version    2.0.12
6    
7  Name:           python-astropy  Name:           python-astropy
8  Version:        3.2.1  Version:        3.2.1
9  Release:        %mkrel 1  Release:        %mkrel 2
10  Group:          Sciences/Astronomy  Group:          Sciences/Astronomy
11  Summary:        Community-developed python astronomy tools  Summary:        Community-developed python astronomy tools
12    
13  License:        BSD  License:        BSD
14  URL:            http://www.astropy.org/  URL:            http://www.astropy.org/
15  Source0:        https://pypi.io/packages/source/a/astropy/astropy-%{version}.tar.gz  Source0:        https://pypi.io/packages/source/a/astropy/astropy-%{version}.tar.gz
 Source1:        https://pypi.io/packages/source/a/astropy/astropy-%{p2version}.tar.gz  
16  Source2:        setup_ah_v2.py  Source2:        setup_ah_v2.py
17  Source3:        setup_ah_v3.py  Source3:        setup_ah_v3.py
18    
 Patch0:         python2-astropy-2.0.12-relax-pytest-version.patch  
   
19  %description  %description
20  Astropy is a package intended to contain core functionality and some  Astropy is a package intended to contain core functionality and some
21  common tools needed for performing astronomy and astrophysics research  common tools needed for performing astronomy and astrophysics research
22  with Python. It also provides an index for other astronomy packages  with Python. It also provides an index for other astronomy packages
23  and tools for managing them.  and tools for managing them.
24    
 %package -n python2-%{upname}  
 Summary:        Community-developed python astronomy tools  
 BuildRequires:  pkgconfig(python2)  
 BuildRequires:  pkgconfig(wcslib)  
 BuildRequires:  pkgconfig(expat)  
 BuildRequires:  pkgconfig(erfa)  
 BuildRequires:  pkgconfig(cfitsio) >= 3.350  
 BuildRequires:  python2-pkg-resources  
 BuildRequires:  python2dist(setuptools)  
 BuildRequires:  python2-numpy-devel  
 Requires:       python2dist(numpy)  
 Obsoletes:      python2-stsci <= 2.13-1.mga4  
 Obsoletes:      python-astropy < 3.0.4-3  
 Provides:       python-astropy = %{version}-%{release}  
   
 %description -n python2-%{upname}  
 Astropy is a package intended to contain core functionality and some  
 common tools needed for performing astronomy and astrophysics research  
 with Python. It also provides an index for other astronomy packages  
 and tools for managing them.  
   
25  %package -n python3-%{upname}  %package -n python3-%{upname}
26  Summary:        Community-developed python astronomy tools  Summary:        Community-developed python astronomy tools
27  BuildRequires:  pkgconfig(python3)  BuildRequires:  pkgconfig(python3)
# Line 62  BuildRequires:  pkgconfig(cfitsio) >= 3. Line 33  BuildRequires:  pkgconfig(cfitsio) >= 3.
33  BuildRequires:  python3-numpy-devel  BuildRequires:  python3-numpy-devel
34  Requires:       python3dist(numpy)  Requires:       python3dist(numpy)
35  Obsoletes:      python3-stsci <= 2.13-1.mga4  Obsoletes:      python3-stsci <= 2.13-1.mga4
36    %{?python_provide:%python_provide python3-%{upname}}
37    
38  %description -n python3-%{upname}  %description -n python3-%{upname}
39  Astropy is a package intended to contain core functionality and some  Astropy is a package intended to contain core functionality and some
# Line 84  files, 'wcslint' for validating the WCS Line 56  files, 'wcslint' for validating the WCS
56  %__rm -rf cextern/erfa  %__rm -rf cextern/erfa
57  %__rm -rf cextern/cfitsio  %__rm -rf cextern/cfitsio
58  %__rm -rf cextern/wcslib  %__rm -rf cextern/wcslib
59  %__rm -rf astropy_helpers/astropy_helpers.egg-info  #__rm -rf astropy_helpers/astropy_helpers.egg-info
60  sed -i -e 's/->quantize_dither/->quantize_method/g' \  sed -i -e 's/->quantize_dither/->quantize_method/g' \
61     astropy/io/fits/src/compressionmodule.c     astropy/io/fits/src/compressionmodule.c
62    
 %setup -T -b 1 -n %{pypi_name}-%{p2version}  
 %__rm -rf cextern/expat  
 %__rm -rf cextern/erfa  
 %__rm -rf cextern/cfitsio  
 %__rm -rf cextern/wcslib  
 %__rm -rf astropy_helpers/astropy_helpers.egg-info  
 sed -i -e 's/->quantize_dither/->quantize_method/g' \  
    astropy/io/fits/src/compressionmodule.c  
   
 %__install %SOURCE2 -m 755 %{_builddir}/%{pypi_name}-%{p2version}/astropy_helpers/setup.py  
 %__install %SOURCE3 -m 755 %{_builddir}/%{pypi_name}-%{version}/astropy_helpers/setup.py  
   
 %patch0 -p1 -b .orig  
   
63  %build  %build
 pushd %{_builddir}/%{pypi_name}-%{p2version}  
 %py2_build -- --use-system-libraries --offline  
 popd  
 pushd %{_builddir}/%{pypi_name}-%{version}  
64  %py3_build -- --use-system-libraries --offline  %py3_build -- --use-system-libraries --offline
 popd  
65    
66  %install  %install
 pushd %{_builddir}/%{pypi_name}-%{p2version}  
 %py2_install -- --use-system-libraries --offline  
 popd  
 pushd %{_builddir}/%{pypi_name}-%{version}  
67  %py3_install -- --use-system-libraries --offline  %py3_install -- --use-system-libraries --offline
 popd  
   
68    
69  %files -n %{upname}-tools  %files -n %{upname}-tools
70  %{_bindir}/volint  %{_bindir}/volint
# Line 130  popd Line 77  popd
77  %{_bindir}/fitsinfo  %{_bindir}/fitsinfo
78  %{_bindir}/showtable  %{_bindir}/showtable
79    
 %files  -n python2-%{upname}  
 %doc README.rst  
 %{python2_sitearch}/%{pypi_name}  
 %{python2_sitearch}/%{pypi_name}-%{p2version}-py?.?.egg-info  
   
   
80  %files -n python3-%{upname}  %files -n python3-%{upname}
81  %doc README.rst  %doc README.rst
82  %{python3_sitearch}/%{pypi_name}  %{python3_sitearch}/%{pypi_name}

Legend:
Removed from v.1441171  
changed lines
  Added in v.1441172

  ViewVC Help
Powered by ViewVC 1.1.30