public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sergio Pascual <sergiopr@fis.ucm.es>
To: git-commits@fedoraproject.org
Subject: [rpms/python-photutils] epel10: Using new macros
Date: Fri, 26 Jun 2026 03:41:37 GMT	[thread overview]
Message-ID: <178244529749.1.17967026972203953014.rpms-python-photutils-639a62be8e0b@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-06-26  3:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178244529749.1.17967026972203953014.rpms-python-photutils-639a62be8e0b@fedoraproject.org \
    --to=sergiopr@fis.ucm.es \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox