[packages/python-jsonpath-ng] - initial

qboosh qboosh at pld-linux.org
Sun Nov 2 20:23:41 CET 2025


commit dda719f1261c855d3c45504ee2b0e9895d19318a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 2 20:23:34 2025 +0100

    - initial

 python-jsonpath-ng.spec | 133 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 133 insertions(+)
---
diff --git a/python-jsonpath-ng.spec b/python-jsonpath-ng.spec
new file mode 100644
index 0000000..1d2502d
--- /dev/null
+++ b/python-jsonpath-ng.spec
@@ -0,0 +1,133 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (built from python3-jsonpath-ng.spec)
+
+Summary:	Final implementation of JSONPath for Python
+Summary(pl.UTF-8):	Ostateczna implementacja JSONPath dla Pythona
+Name:		python-jsonpath-ng
+# keep 1.5.x here for python2 support
+Version:	1.5.3
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/jsonpath-ng/
+Source0:	https://files.pythonhosted.org/packages/source/j/jsonpath-ng/jsonpath-ng-%{version}.tar.gz
+# Source0-md5:	c06a0e55097244332b277bc1fcf0e3c8
+URL:		https://pypi.org/project/jsonpath-ng/
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-decorator
+BuildRequires:	python-oslotest
+BuildRequires:	python-ply
+BuildRequires:	python-pytest
+BuildRequires:	python-six
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.5
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-decorator
+BuildRequires:	python3-oslotest
+BuildRequires:	python3-ply
+BuildRequires:	python3-pytest
+BuildRequires:	python3-six
+%endif
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A final implementation of JSONPath for Python that aims to be standard
+compliant, including arithmetic and binary comparison operators and
+providing clear AST for metaprogramming.
+
+%description -l pl.UTF-8
+Ostateczna implementacja JSONPath dla Pythona, której celem jest
+zgodność ze standardem wraz z operatorami arytmetycznymi i binarnymi
+porównania oraz zapewnienie czystego AST do metaprogramowania.
+
+%package -n python3-jsonpath-ng
+Summary:	Final implementation of JSONPath for Python
+Summary(pl.UTF-8):	Ostateczna implementacja JSONPath dla Pythona
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.5
+
+%description -n python3-jsonpath-ng
+A final implementation of JSONPath for Python that aims to be standard
+compliant, including arithmetic and binary comparison operators and
+providing clear AST for metaprogramming.
+
+%description -n python3-jsonpath-ng -l pl.UTF-8
+Ostateczna implementacja JSONPath dla Pythona, której celem jest
+zgodność ze standardem wraz z operatorami arytmetycznymi i binarnymi
+porównania oraz zapewnienie czystego AST do metaprogramowania.
+
+%prep
+%setup -q -n jsonpath-ng-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonpath_ng{,-2}
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/jsonpath_ng{,-3}
+ln -s jsonpath_ng $RPM_BUILD_ROOT%{_bindir}/jsonpath_ng
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/jsonpath_ng-2
+%{py_sitescriptdir}/jsonpath_ng
+%{py_sitescriptdir}/jsonpath_ng-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-jsonpath-ng
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/jsonpath_ng-3
+%{_bindir}/jsonpath_ng
+%{py3_sitescriptdir}/jsonpath_ng
+%{py3_sitescriptdir}/jsonpath_ng-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-jsonpath-ng.git/commitdiff/dda719f1261c855d3c45504ee2b0e9895d19318a



More information about the pld-cvs-commit mailing list