[packages/python-jsonpointer] - updated to 2.4, drop separate jsonpointer package
qboosh
qboosh at pld-linux.org
Wed Jul 16 22:48:55 CEST 2025
commit 88a1af25cb08bab5ce03fd84cc0381ee9c5ae7c1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Jul 16 22:50:32 2025 +0200
- updated to 2.4, drop separate jsonpointer package
python-jsonpointer.spec | 73 ++++++++++++++++++++++---------------------------
1 file changed, 33 insertions(+), 40 deletions(-)
---
diff --git a/python-jsonpointer.spec b/python-jsonpointer.spec
index 57f45e5..d2ff60b 100644
--- a/python-jsonpointer.spec
+++ b/python-jsonpointer.spec
@@ -1,19 +1,20 @@
#
# Conditional build:
-%bcond_without tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module
+%bcond_with python3 # CPython 3.x module (built from python3-jsonpointer.spec)
Summary: Identify specific nodes in a JSON document (RFC 6901)
Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
Name: python-jsonpointer
-Version: 2.3
-Release: 4
+# keep 2.x here for python2 support
+Version: 2.4
+Release: 1
License: BSD
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/jsonpointer/
Source0: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
-# Source0-md5: 57fd6581e61d56960d8c2027ff33f5c0
+# Source0-md5: 16d785130e5ff235e4ae336eaa611e13
URL: https://pypi.org/project/jsonpointer/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
@@ -22,7 +23,7 @@ BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
%endif
%if %{with python3}
-BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-setuptools
%endif
Requires: python-modules >= 1:2.7
@@ -30,49 +31,44 @@ BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-Library to resolve JSON Pointers according to RFC 6901.
+Library and tool to resolve JSON Pointers according to RFC 6901.
%description -l pl.UTF-8
-Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
+Biblioteka i narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC
+6901.
%package -n python3-jsonpointer
Summary: Identify specific nodes in a JSON document (RFC 6901)
Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
Group: Libraries/Python
-Requires: python3-modules >= 1:3.5
+Requires: python3-modules >= 1:3.7
+Obsoletes: jsonpointer < 2.4
%description -n python3-jsonpointer
-Library to resolve JSON Pointers according to RFC 6901.
+Library and tool to resolve JSON Pointers according to RFC 6901.
%description -n python3-jsonpointer -l pl.UTF-8
-Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
-
-%package -n jsonpointer
-Summary: Identify specific nodes in a JSON document (RFC 6901)
-Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
-Group: Applications/Text
-%if %{with python3}
-Requires: python3-jsonpointer = %{version}-%{release}
-%else
-Requires: %{name} = %{version}-%{release}
-%endif
-
-%description -n jsonpointer
-Tool to resolve JSON Pointers according to RFC 6901.
-
-%description -n jsonpointer -l pl.UTF-8
-Narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
+Biblioteka i narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC
+6901.
%prep
%setup -q -n jsonpointer-%{version}
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} -m unittest tests
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest tests
+%endif
%endif
%install
@@ -82,14 +78,15 @@ rm -rf $RPM_BUILD_ROOT
%py_install
%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonpointer{,-2}
%endif
%if %{with python3}
-# install may not overwrite existing file
-%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
%py3_install
-%else
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonpointer{,-2}
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonpointer{,-3}
+ln -sf jsonpointer-3 $RPM_BUILD_ROOT%{_bindir}/jsonpointer
%endif
%clean
@@ -99,6 +96,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS LICENSE.txt README.md
+%attr(755,root,root) %{_bindir}/jsonpointer-2
%{py_sitescriptdir}/jsonpointer.py[co]
%{py_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
%endif
@@ -107,14 +105,9 @@ rm -rf $RPM_BUILD_ROOT
%files -n python3-jsonpointer
%defattr(644,root,root,755)
%doc AUTHORS LICENSE.txt README.md
+%attr(755,root,root) %{_bindir}/jsonpointer
+%attr(755,root,root) %{_bindir}/jsonpointer-3
%{py3_sitescriptdir}/jsonpointer.py
%{py3_sitescriptdir}/__pycache__/jsonpointer.cpython-*.py[co]
%{py3_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
%endif
-
-%files -n jsonpointer
-%defattr(644,root,root,755)
-%if %{with python3}
-%attr(755,root,root) %{_bindir}/jsonpointer
-%endif
-%attr(755,root,root) %{_bindir}/jsonpointer-2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-jsonpointer.git/commitdiff/88a1af25cb08bab5ce03fd84cc0381ee9c5ae7c1
More information about the pld-cvs-commit
mailing list