File python-pyfits.spec of Package python-pyfits

#
# spec file for package python-pyfits
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           python-pyfits
Version:        3.3
Release:        0
License:        BSD-3-Clause
Summary:        Reads and writes FITS files - DEPRECATED
Url:            http://www.stsci.edu/institute/software_hardware/pyfits
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/p/pyfits/pyfits-%{version}.tar.gz
#PATCH-FIX-OPENSUSE pyfits-3.3-use-external-cfitsio.patch -- use external cfitsio
Patch0:         pyfits-3.3-use-external-cfitsio.patch
BuildRequires:  fdupes
BuildRequires:  cfitsio-devel
BuildRequires:  zlib-devel
BuildRequires:  python-devel
BuildRequires:  python-d2to1 >= 0.2.5
BuildRequires:  python-setuptools
BuildRequires:  python-stscidistutils >= 0.3
BuildRequires:  python-numpy-devel
Requires:       python-numpy
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
PyFITS provides an interface to FITS formatted files in the Python scripting
language. It is useful both for interactive data analysis and for writing
analysis scripts in Python using FITS files as either input or output. PyFITS
is a development project of the Science Software Branch at the Space Telescope
Science Institute.

All of the functionality of PyFITS is now available in Astropy as the 
astropy.io.fits package, which is now publicly available. Although we will
continue to release PyFITS separately in the short term, including any 
critical bug fixes, we will eventually stop releasing new versions of PyFITS 
as a stand-alone product. The exact timing of when we will discontinue new
PyFITS releases is not yet settled, but users should not expect PyFITS 
releases to extend much past early 2014. Users of PyFITS should plan to make
suitable changes to support the transition to Astropy on such a timescale.
For the vast majority of users this transition is mainly a matter of changing
the import statements in their code--all APIs are otherwise identical to 
PyFITS.  STScI will continue to provide support for questions related to
PyFITS and to the new astropy.io.fits package in Astropy.

%prep
%setup -q -n pyfits-%{version}
%patch0 -p1

%build
rm -rf cextern
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{python_sitearch}

%files
%defattr(-,root,root,-)
%doc CHANGES.txt LICENSE.txt README.txt
%{_bindir}/fitscheck
%{_bindir}/fitsdiff
%{python_sitearch}/pyfits/
%{python_sitearch}/pyfits-%{version}-py*.egg-info

%changelog
openSUSE Build Service is sponsored by