public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-photutils] epel10: Using new macros
@ 2026-06-26 3:41 Sergio Pascual
0 siblings, 0 replies; only message in thread
From: Sergio Pascual @ 2026-06-26 3:41 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-photutils
Branch : epel10
Commit : 639a62be8e0b43b63fcc927d8117644713dd1315
Author : Sergio Pascual <sergiopr@fis.ucm.es>
Date : 2015-11-26T10:26:01+01:00
Stats : +51/-68 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-photutils/c/639a62be8e0b43b63fcc927d8117644713dd1315?branch=epel10
Log:
Using new macros
- Disable tests until 0.2 is released
---
diff --git a/python-photutils.spec b/python-photutils.spec
index a4aca77..a16fee8 100644
--- a/python-photutils.spec
+++ b/python-photutils.spec
@@ -1,34 +1,38 @@
-%global with_python3 1
-%global upname photutils
+%global srcname photutils
-Name: python-%{upname}
+Name: python-%{srcname}
Version: 0.1
-Release: 5%{?dist}
+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/photutils-0.1.tar.gz
+Source0: https://pypi.python.org/packages/source/p/photutils/%{srcname}-%{version}.tar.gz
-# we don't want to provide private python extension libs
-%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
+BuildRequires: python2-devel python3-devel
-BuildRequires: python2-devel python-astropy Cython
-BuildRequires: python-scikit-image
-# For tests
-BuildRequires: pytest
+%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
-%if 0%{?with_python3}
-BuildRequires: python3-devel python3-astropy python3-Cython
-BuildRequires: python3-scikit-image
-# For tests
-BuildRequires: python3-pytest
-%endif # if with_python3
+%package -n python2-%{srcname}
+Summary: Astropy affiliated package for image photometry tasks
-Requires: python-astropy
-Requires: python-scikit-image
+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
+%description -n python2-%{srcname}
Photutils contains functions for:
* estimating the background and background rms in astronomical images
* detecting sources in astronomical images
@@ -36,15 +40,18 @@ Photutils contains functions for:
centroid and shape parameters)
* performing aperture and PSF photometry
-
-%if 0%{?with_python3}
-%package -n python3-%{upname}
+%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-%{upname}
+%description -n python3-%{srcname}
Photutils contains functions for:
* estimating the background and background rms in astronomical images
* detecting sources in astronomical images
@@ -52,71 +59,47 @@ Photutils contains functions for:
centroid and shape parameters)
* performing aperture and PSF photometry
-
-%endif # with_python3
-
%prep
-%setup -qn %{upname}-%{version}
-
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
-%endif # with_python3
-
-find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
+%autosetup -n %{srcname}-%{version}
%build
-CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
-popd
-%endif # with_python3
+%py2_build
+%py3_build
%install
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py install --skip-build --root %{buildroot}
-popd
-%endif # with_python3
-
-%{__python2} setup.py install --skip-build --root %{buildroot}
-
-find %{buildroot} -name "*.so" | xargs chmod 755
-find %{buildroot} -name "*.c" | xargs rm
+%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" %{upname}
+#py.test-%{python2_version} -k "not aperture_photometry" %{srcname}
popd
-%if 0%{?with_python3}
pushd %{buildroot}/%{python3_sitearch}
-py.test-%{python3_version} -k "not aperture_photometry" %{upname}
+#py.test-%{python3_version} -k "not aperture_photometry" %{srcname}
popd
-%endif # with_python3
-%files
+%files -n python2-%{srcname}
%doc README.rst
%license licenses/LICENSE.rst
-%{python2_sitearch}/%{upname}-%{version}-py%{python2_version}.egg-info
-%{python2_sitearch}/%{upname}
+%{python2_sitearch}/%{srcname}-%{version}-py%{python2_version}.egg-info
+%{python2_sitearch}/%{srcname}
-%if 0%{?with_python3}
-%files -n python3-%{upname}
+%files -n python3-%{srcname}
%doc README.rst
%license licenses/LICENSE.rst
-%{python3_sitearch}/%{upname}-%{version}-py%{python3_version}.egg-info
-%{python3_sitearch}/%{upname}
-%endif # with_python3
-
+%{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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-26 3:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-26 3:41 [rpms/python-photutils] epel10: Using new macros Sergio Pascual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox