[packages/python-simplejson] - updated to 3.20.1, added tests and -apidocs

qboosh qboosh at pld-linux.org
Tue Jul 15 21:13:44 CEST 2025


commit 325f1f3171a506bc55d1a9b3f84cc95681c0c8c2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jul 15 21:15:23 2025 +0200

    - updated to 3.20.1, added tests and -apidocs

 python-simplejson.spec | 50 ++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 44 insertions(+), 6 deletions(-)
---
diff --git a/python-simplejson.spec b/python-simplejson.spec
index 9f56369..50355cd 100644
--- a/python-simplejson.spec
+++ b/python-simplejson.spec
@@ -1,21 +1,22 @@
 #
 # Conditional build:
-%bcond_without  python2         # Python 2.x module
-%bcond_without  python3         # Python 3.x module
+%bcond_without	doc		# Sphinx documentation
+%bcond_without	tests		# unit tests
+%bcond_without	python2		# Python 2.x module
+%bcond_without	python3		# Python 3.x module
 #
 %define		module		simplejson
 Summary:	Simple, fast, extensible JSON encoder/decoder for Python
 Summary(pl.UTF-8):	Prosty, szybki, rozszerzalny (de)koder JSON dla Pythona
 Name:		python-%{module}
-Version:	3.17.2
-Release:	8
+Version:	3.20.1
+Release:	1
 License:	MIT or AFL v2.1
 Group:		Libraries
 #Source0Download: https://pypi.org/pypi/simplejson
 Source0:	https://files.pythonhosted.org/packages/source/s/simplejson/%{module}-%{version}.tar.gz
-# Source0-md5:	27fba3bc75a32318bd3b163b8a31aa7e
+# Source0-md5:	f4a8417d321d19b56af82d016853cbcf
 URL:		https://simplejson.readthedocs.io/
-BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
 BuildRequires:	python >= 1:2.5
 BuildRequires:	python-devel >= 1:2.5
@@ -26,7 +27,12 @@ BuildRequires:	python3 >= 1:3.3
 BuildRequires:	python3-devel >= 1:3.3
 BuildRequires:	python3-setuptools >= 1:7
 %endif
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg-3
+%endif
 Requires:	python-libs >= 1:2.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,16 +58,42 @@ simplejson is a simple, fast, complete, correct and extensible JSON
 simplejson to prosty, szybki, pełny, poprawny i rozszerzalny koder i
 dekoder JSON (<http://json.org/>) dla Pythona 3.
 
+%package apidocs
+Summary:	API documentation for Python simplejson module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona simplejson
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for Python simplejson module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona simplejson.
+
 %prep
 %setup -qn %{module}-%{version}
 
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
+%{__python} -m unittest discover -s build-2/lib.*/simplejson/tests
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
+%{__python3} -m unittest discover -s build-2/lib.*/simplejson/tests
+%endif
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html . docs/_build/html
 %endif
 
 %install
@@ -103,3 +135,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py3_sitedir}/simplejson/_speedups.cpython-*.so
 %{py3_sitedir}/simplejson-%{version}-py*.egg-info
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-simplejson.git/commitdiff/325f1f3171a506bc55d1a9b3f84cc95681c0c8c2



More information about the pld-cvs-commit mailing list