[python-sep] Import python-sep 0.2.0

Sergio Pascual sergiopr at fedoraproject.org
Fri Jan 23 14:05:33 UTC 2015


commit 88046fedfb83ef104edd6a2b6b0e2540c5907cff
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date:   Fri Jan 23 15:05:42 2015 +0100

    Import python-sep 0.2.0

 .gitignore      |    1 +
 python-sep.spec |   87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 3 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3ad20c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sep-0.2.0.tar.gz
diff --git a/python-sep.spec b/python-sep.spec
new file mode 100644
index 0000000..754cedd
--- /dev/null
+++ b/python-sep.spec
@@ -0,0 +1,87 @@
+%global upname sep
+%global with_python3 1
+
+Name: python-%{upname}
+Version: 0.2.0
+Release: 1%{?dist}
+Summary: Astronomical source extraction and photometry in Python
+
+License: MIT and LGPLv3+ 
+
+URL: http://sep.readthedocs.org/
+Source0: https://pypi.python.org/packages/source/s/sep/sep-%{version}.tar.gz
+
+BuildRequires: python2-devel python-setuptools
+BuildRequires: numpy
+
+Requires: numpy
+
+%description
+SEP makes available some of the astronomical source extraction and 
+photometry algorithms in Source Extractor as stand-alone 
+functions and classes. These operate directly on in-memory numpy arrays 
+(no FITS files, configuration files, etc). It’s derived directly from 
+(and tested against) the Source Extractor code base.
+
+%if 0%{?with_python3}
+%package -n python3-%{upname}
+Summary: Astronomical source extraction and photometry in Python
+BuildRequires: python3-devel python3-setuptools
+BuildRequires: python3-numpy
+
+Requires: python3-numpy
+
+%description -n python3-%{upname}
+SEP makes available some of the astronomical source extraction and 
+photometry algorithms in Source Extractor as stand-alone 
+functions and classes. These operate directly on in-memory numpy arrays 
+(no FITS files, configuration files, etc). It’s derived directly from 
+(and tested against) the Source Extractor code base.
+
+%endif # with_python3
+
+%prep
+%setup -q -n %{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="%{optflags}" %{__python2} setup.py build 
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+CFLAGS="%{optflags}" %{__python3} setup.py build 
+popd
+%endif # with_python3
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot} 
+chmod 755 %{buildroot}/%{python3_sitearch}/sep*.so
+popd
+%endif # with_python3
+
+%{__python2} setup.py install --skip-build --root %{buildroot} 
+chmod 755 %{buildroot}/%{python2_sitearch}/sep.so
+
+%files
+%doc AUTHORS.md README.md CHANGES.md licenses/MIT_LICENSE.md licenses/LGPL_LICENSE.txt
+%{python2_sitearch}/*
+
+%if 0%{?with_python3}
+%files -n python3-%{upname}
+%doc AUTHORS.md README.md CHANGES.md licenses/MIT_LICENSE.md licenses/LGPL_LICENSE.txt
+%{python3_sitearch}/*
+%endif # with_python3
+
+%changelog
+* Tue Dec 16 2014 Sergio Pascual <sergio.pasra at gmail.com> - 0.2.0-1
+- Initial specfile
+
diff --git a/sources b/sources
index e69de29..3cfddb7 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+96251d2d6a1c2413db86316725596e7f  sep-0.2.0.tar.gz


More information about the scm-commits mailing list