Blob Blame History Raw
%global srcname photutils

Name: python-%{srcname}
Version: 0.1
Release: 6%{?dist}
Summary: Astropy affiliated package for image photometry tasks
License: BSD

URL: http://photutils.readthedocs.org/en/latest/index.html
Source0: https://pypi.python.org/packages/source/p/photutils/%{srcname}-%{version}.tar.gz

BuildRequires: python2-devel python3-devel

%description
Photutils contains functions for:
 * estimating the background and background rms in astronomical images
 * detecting sources in astronomical images
 * estimating morphological parameters of those sources (e.g., 
    centroid and shape parameters)
 * performing aperture and PSF photometry

%package -n python2-%{srcname}
Summary: Astropy affiliated package for image photometry tasks

BuildRequires: python2-devel
BuildRequires: Cython
BuildRequires: python2-astropy
BuildRequires: python2-scikit-image
# For tests
BuildRequires: python2-pytest
%{?python_provide:%python_provide python2-%{srcname}}
Requires: python2-astropy
Requires: python2-scikit-image

%description -n python2-%{srcname}
Photutils contains functions for:
 * estimating the background and background rms in astronomical images
 * detecting sources in astronomical images
 * estimating morphological parameters of those sources (e.g., 
    centroid and shape parameters)
 * performing aperture and PSF photometry

%package -n python3-%{srcname}
Summary: Astropy affiliated package for image photometry tasks

BuildRequires: python3-devel python3-astropy python3-Cython
BuildRequires: python3-scikit-image
# For tests
BuildRequires: python3-pytest
%{?python_provide:%python_provide python3-%{srcname}}
Requires: python3-astropy
Requires: python3-scikit-image

%description -n python3-%{srcname}
Photutils contains functions for:
 * estimating the background and background rms in astronomical images
 * detecting sources in astronomical images
 * estimating morphological parameters of those sources (e.g., 
    centroid and shape parameters)
 * performing aperture and PSF photometry

%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

# Disable the aperture_photometry tests due to a bug
# https://github.com/astropy/photutils/issues/242
# Disable all tests until 0.2 is released
# https://github.com/astropy/photutils/issues/293
%check
pushd %{buildroot}/%{python2_sitearch}
#py.test-%{python2_version} -k "not aperture_photometry" %{srcname}
popd

pushd %{buildroot}/%{python3_sitearch}
#py.test-%{python3_version} -k "not aperture_photometry" %{srcname}
popd

%files -n python2-%{srcname}
%doc README.rst
%license licenses/LICENSE.rst
%{python2_sitearch}/%{srcname}-%{version}-py%{python2_version}.egg-info
%{python2_sitearch}/%{srcname}

%files -n python3-%{srcname}
%doc README.rst
%license licenses/LICENSE.rst
%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info
%{python3_sitearch}/%{srcname}

%changelog
* Thu Nov 26 2015 Sergio Pascual <sergiopr@fedoraproject.com> - 0.1-6
- Using new macros
- Disable tests until 0.2 is released

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jan 28 2015 Sergio Pascual <sergiopr@fedoraproject.com> - 0.1-3
- Use license macro

* Mon Jan 26 2015 Sergio Pascual <sergiopr@fedoraproject.com> - 0.1-2
- Disable test due to a bug (reported upstream)

* Thu Jan 08 2015 Sergio Pascual <sergiopr@fedoraproject.com> - 0.1-1
- First upstream release

* Wed Feb 26 2014 Sergio Pascual <sergiopr@fedoraproject.com> - 0.0-0.1.20140226git37a77fe
- Initial spec file