[packages/python-smmap] - updated to 2.0.5, added python3- package

qboosh qboosh at pld-linux.org
Thu Mar 21 17:27:39 CET 2019


commit f357508ade45acf2da7bf69d19f613e7e8eb7f86
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Mar 21 17:33:33 2019 +0100

    - updated to 2.0.5, added python3- package

 python-smmap.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 71 insertions(+), 13 deletions(-)
---
diff --git a/python-smmap.spec b/python-smmap.spec
index 8ef193a..b40ea97 100644
--- a/python-smmap.spec
+++ b/python-smmap.spec
@@ -1,50 +1,108 @@
 #
 # Conditional build:
-%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2	# CPython 2.x module
+%bcond_without	python3	# CPython 3.x module
+%bcond_without	tests	# unit tests
 
 %define		module	smmap
-Summary:	A pure git implementation of a sliding window memory map manager
-# Name must match the python module/package name (as in 'import' statement)
+Summary:	A pure Python implementation of a sliding window memory map manager
+Summary(pl.UTF-8):	Czysto pythonowa implementacja zarządcy odwzorowania w pamięci z przesuwnym oknem
 Name:		python-%{module}
-Version:	2.0.3
+Version:	2.0.5
 Release:	1
 License:	BSD
 Group:		Development/Languages/Python
+#Source0Download: https://github.com/gitpython-developers/smmap/releases
 Source0:	https://github.com/gitpython-developers/smmap/archive/v%{version}/%{module}-%{version}.tar.gz
-# Source0-md5:	87427acfb9d65867544d34a12434e502
-URL:		https://github.com/Byron/smmap
-BuildRequires:	python-distribute
+# Source0-md5:	e20f277aa4d654c85383d582c6339eb6
+URL:		https://github.com/gitpython-developers/smmap
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-nose
+BuildRequires:	python-nosexcover
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-nose
+BuildRequires:	python3-nosexcover
+%endif
+%endif
 BuildRequires:	rpm-pythonprov
-# if py_postclean is used
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpmbuild(macros) >= 1.714
 Requires:	python-modules
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-A pure git implementation of a sliding window memory map manager.
+A pure Python implementation of a sliding window memory map manager.
+
+%description -l pl.UTF-8
+Czysto pythonowa implementacja zarządcy odwzorowania w pamięci z
+przesuwnym oknem.
+
+%package -n python3-%{module}
+Summary:	A pure Python implementation of a sliding window memory map manager
+Summary(pl.UTF-8):	Czysto pythonowa implementacja zarządcy odwzorowania w pamięci z przesuwnym oknem
+Group:		Development/Languages/Python
+Requires:	python3-modules >= 1:3.4
+
+%description -n python3-%{module}
+A pure Python implementation of a sliding window memory map manager.
+
+%description -n python3-%{module} -l pl.UTF-8
+Czysto pythonowa implementacja zarządcy odwzorowania w pamięci z
+przesuwnym oknem.
 
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
 
-%{?with_tests:%{__python} setup.py test}
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %py_install
 
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/smmap/test
 
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/smmap/test
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %dir %{py_sitescriptdir}/smmap
 %{py_sitescriptdir}/smmap/*.py[co]
-%{py_sitescriptdir}/smmap2-*.egg-info
+%{py_sitescriptdir}/smmap2-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/smmap
+%{py3_sitescriptdir}/smmap/*.py
+%{py3_sitescriptdir}/smmap/__pycache__
+%{py3_sitescriptdir}/smmap2-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-smmap.git/commitdiff/f357508ade45acf2da7bf69d19f613e7e8eb7f86



More information about the pld-cvs-commit mailing list