[packages/python-anyjson] - pl, completed BRs, run py3 tests too

qboosh qboosh at pld-linux.org
Wed Jan 27 20:15:10 CET 2021


commit f107bc6fd6a73e90e8d348875097cc2c38d26ff9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jan 27 20:15:10 2021 +0100

    - pl, completed BRs, run py3 tests too

 python-anyjson.spec | 42 ++++++++++++++++++++++++++++++++----------
 1 file changed, 32 insertions(+), 10 deletions(-)
---
diff --git a/python-anyjson.spec b/python-anyjson.spec
index acfb25e..94b6eab 100644
--- a/python-anyjson.spec
+++ b/python-anyjson.spec
@@ -6,6 +6,7 @@
 
 %define 	module	anyjson
 Summary:	JSON implementation in a common interface
+Summary(pl.UTF-8):	Implementacja JSON we wspólnym interfejsie
 Name:		python-%{module}
 Version:	0.3.3
 Release:	6
@@ -15,15 +16,19 @@ Source0:	http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}
 # Source0-md5:	2ea28d6ec311aeeebaf993cb3008b27c
 URL:		https://bitbucket.org/runeh/anyjson
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
+BuildRequires:	python-modules >= 1:2.4
 %{?with_tests:BuildRequires: python-nose}
 BuildRequires:	python-setuptools
 %endif
 %if %{with python3}
+BuildRequires:	python3-2to3 >= 1:3.2
+BuildRequires:	python3-modules >= 1:3.2
+%{?with_tests:BuildRequires: python3-nose}
 BuildRequires:	python3-setuptools
 %endif
-Requires:	python-modules
+Requires:	python-modules >= 1:2.4
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -32,16 +37,25 @@ Anyjson loads whichever is the fastest JSON module installed and
 provides a uniform API regardless of which JSON implementation is
 used.
 
+%description -l pl.UTF-8
+Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
+udostępnia jednolite API, niezależnie od używanej implementacji JSON.
+
 %package -n python3-%{module}
 Summary:	JSON implementation in a common interface
+Summary(pl.UTF-8):	Implementacja JSON we wspólnym interfejsie
 Group:		Libraries/Python
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.2
 
 %description -n python3-%{module}
 Anyjson loads whichever is the fastest JSON module installed and
 provides a uniform API regardless of which JSON implementation is
 used.
 
+%description -n python3-%{module} -l pl.UTF-8
+Anyjson ładuje najszybszy moduł JSON, jaki jest zainstalowany i
+udostępnia jednolite API, niezależnie od używanej implementacji JSON.
+
 %prep
 %setup -q -n %{module}-%{version}
 
@@ -51,9 +65,15 @@ used.
 %endif
 
 %if %{with python3}
-%py3_build # %{?with_tests:test}
-%endif
+%py3_build
 
+%if %{with tests}
+# tests must be run using 2to3'd sources
+cd build-3/lib
+%{__python3} -m nose ../../tests
+cd ../..
+%endif
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -71,18 +91,20 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGELOG README
+%doc CHANGELOG LICENSE README
 %{py_sitescriptdir}/%{module}
 %if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
 %endif
 
+%if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc CHANGELOG README
+%doc CHANGELOG LICENSE README
 %{py3_sitescriptdir}/%{module}
-%if "%{py_ver}" > "2.4"
-%{py3_sitescriptdir}/%{module}-*.egg-info
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-anyjson.git/commitdiff/f107bc6fd6a73e90e8d348875097cc2c38d26ff9



More information about the pld-cvs-commit mailing list