ausil pushed to python-smmap (epel7). "update to 0.9.0 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Jun 1 02:08:35 UTC 2015


From a0a37767f323bf5b9dda573129683afb731f96e5 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Sun, 31 May 2015 12:07:58 -0500
Subject: update to 0.9.0

- enable python3 support

diff --git a/.gitignore b/.gitignore
index 23bc45b..c126a60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /smmap-0.8.1.tar.gz
+/smmap-0.9.0.tar.gz
diff --git a/python-smmap.spec b/python-smmap.spec
index 75d858b..33b6e02 100644
--- a/python-smmap.spec
+++ b/python-smmap.spec
@@ -1,51 +1,97 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%if 0%{?fedora} > 12
+%global with_python3 1
+%else
+%if 0%{?rhel} && 0%{?rhel} <= 7
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%else
+%global with_python3 1
+%endif
+%endif
 
 Name:           python-smmap
-Version:        0.8.1
-Release:        8%{?dist}
+Version:        0.9.0
+Release:        1%{?dist}
 Summary:        Sliding window memory map manager
 
 License:        BSD
 URL:            https://github.com/Byron/smmap
-# Download from http://pypi.python.org/packages/source/s/smmap/smmap-0.8.1.tar.gz#md5=a35b64bbb7068b7a3f2e0651b72646b2
-Source0:        http://pypi.python.org/packages/source/s/smmap/smmap-0.8.1.tar.gz
-# https://github.com/Byron/smmap/commit/bdc1258abb48328a389720df2ffc404692add426
-Patch0:         0001-Added-LICENSE-file-containing-a-copy-of-new-BSD.patch
+# Download from https://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz#md5=d7932d5ace206bf4ae15198cf36fb6ab
+Source0:        http://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz
 BuildArch:      noarch
 BuildRequires:  python-devel, python-setuptools, python-nose
 
 %description
 A pure python implementation of a sliding window memory map manager
 
+%if 0%{?with_python3}
+%package -n python3-smmap
+Summary:        Python3 Sliding window memory map manager
+BuildRequires:  python3-devel, python3-setuptools, python3-nose
+
+%description -n python3-smmap
+%{description}
+%endif # if with_python3
 
 %prep
-%setup -q -n smmap-%{version}
-%patch0 -p1
+%setup -qc -n smmap-%{version}
+mv smmap-%{version} python2
+
+%if 0%{?with_python3}
+cp -a python2 python3
+find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
 
+find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
 
 %build
-%{__python} setup.py build
+pushd python2
+%{__python2} setup.py build
+popd
 
+%if 0%{?with_python3}
+pushd python3
+%{__python3} setup.py build
+popd
+%endif # with_python3
 
 %check
+pushd python2
 nosetests
-
+popd
+%if 0%{?with_python3}
+pushd python3
+nosetests
+popd
+%endif # with_python3
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_ROOT%{python_sitelib}/smmap/test
+pushd python2
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
+rm -rf %{buildroot}%{python2_sitelib}/smmap/test
+popd
+%if 0%{?with_python3}
+pushd python3
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif # with_python3
 
 
 %files
-%doc LICENSE
-# For noarch packages: sitelib
-%{python_sitelib}/smmap/
-%{python_sitelib}/smmap-%{version}-py?.?.egg-info
+%{python2_sitelib}/smmap/
+%{python2_sitelib}/smmap-%{version}-py?.?.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-smmap
+%{python3_sitelib}/smmap-%{version}-py?.?.egg-info
+%{python3_sitelib}/smmap/
+%endif # with_python3
 
 %changelog
+* Wed May 27 2015 Dennis Gilmore <dennis at ausil.us> - 0.9.0-1
+- update to 0.9.0
+- enable python3 support
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.1-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index 9dcc871..4328342 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a35b64bbb7068b7a3f2e0651b72646b2  smmap-0.8.1.tar.gz
+d7932d5ace206bf4ae15198cf36fb6ab  smmap-0.9.0.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-smmap.git/commit/?h=epel7&id=a0a37767f323bf5b9dda573129683afb731f96e5


More information about the scm-commits mailing list