[python-photutils] Initial import

Sergio Pascual sergiopr at fedoraproject.org
Wed Jan 28 12:47:00 UTC 2015


commit f952a69ceb8d16803162c136d68bc980340e9556
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date:   Wed Jan 28 13:46:39 2015 +0100

    Initial import

 .gitignore            |    1 +
 python-photutils.spec |  131 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 3 files changed, 133 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d1fbe91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/photutils-0.1.tar.gz
diff --git a/python-photutils.spec b/python-photutils.spec
new file mode 100644
index 0000000..02154da
--- /dev/null
+++ b/python-photutils.spec
@@ -0,0 +1,131 @@
+%global with_python3 1
+%global upname photutils
+
+Name: python-%{upname}
+Version: 0.1
+Release: 3%{?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
+
+# we don't want to provide private python extension libs
+%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
+
+BuildRequires: python2-devel python-astropy Cython
+BuildRequires: python-scikit-image
+# For tests
+BuildRequires: pytest
+
+%if 0%{?with_python3}
+BuildRequires: python3-devel python3-astropy python3-Cython
+BuildRequires: python3-scikit-image
+# For tests
+BuildRequires: python3-pytest
+%endif # if with_python3
+
+Requires: python-astropy
+Requires: python-scikit-image
+
+%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}
+%package -n python3-%{upname}
+Summary: Astropy affiliated package for image photometry tasks
+Requires: python3-astropy
+Requires: python3-scikit-image
+
+
+%description -n python3-%{upname}
+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
+
+
+%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}|'
+
+%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
+
+%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
+
+# Disable the aperture_photometry tests due to a bug
+# https://github.com/astropy/photutils/issues/242
+%check
+pushd %{buildroot}/%{python2_sitearch}
+py.test-%{python2_version} -k "not aperture_photometry" %{upname}
+popd
+
+%if 0%{?with_python3}
+pushd %{buildroot}/%{python3_sitearch}
+py.test-%{python3_version} -k "not aperture_photometry" %{upname}
+popd
+%endif # with_python3
+
+%files
+%doc README.rst
+%license licenses/LICENSE.rst
+%{python2_sitearch}/%{upname}-%{version}-py%{python2_version}.egg-info
+%{python2_sitearch}/%{upname}
+
+%if 0%{?with_python3}
+%files -n python3-%{upname}
+%doc README.rst
+%license licenses/LICENSE.rst
+%{python3_sitearch}/%{upname}-%{version}-py%{python3_version}.egg-info
+%{python3_sitearch}/%{upname}
+%endif # with_python3
+
+
+%changelog
+* Wed Jan 28 2015 Sergio Pascual <sergiopr at fedoraproject.com> - 0.1-3
+- Use license macro
+
+* Mon Jan 26 2015 Sergio Pascual <sergiopr at fedoraproject.com> - 0.1-2
+- Disable test due to a bug (reported upstream)
+
+* Thu Jan 08 2015 Sergio Pascual <sergiopr at fedoraproject.com> - 0.1-1
+- First upstream release
+
+* Wed Feb 26 2014 Sergio Pascual <sergiopr at fedoraproject.com> - 0.0-0.1.20140226git37a77fe
+- Initial spec file
+
diff --git a/sources b/sources
index e69de29..d1e37f9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+76f51bc70c32f7bb0bccfd5b1a299a71  photutils-0.1.tar.gz


More information about the scm-commits mailing list