3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Identify specific nodes in a JSON document (RFC 6901)
8 Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
9 Name: python-jsonpointer
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/jsonpointer/
15 Source0: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
16 # Source0-md5: 741b98d0e693b08b5e44e0a9da5a7bb7
17 URL: https://pypi.org/project/jsonpointer/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
25 BuildRequires: python3-modules >= 1:3.4
26 BuildRequires: python3-setuptools
28 Requires: python-modules >= 1:2.7
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Library to resolve JSON Pointers according to RFC 6901.
35 %description -l pl.UTF-8
36 Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
38 %package -n python3-jsonpointer
39 Summary: Identify specific nodes in a JSON document (RFC 6901)
40 Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
41 Group: Libraries/Python
42 Requires: python3-modules >= 1:3.4
44 %description -n python3-jsonpointer
45 Library to resolve JSON Pointers according to RFC 6901.
47 %description -n python3-jsonpointer -l pl.UTF-8
48 Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
50 %package -n jsonpointer
51 Summary: Identify specific nodes in a JSON document (RFC 6901)
52 Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
53 Group: Applications/Text
55 Requires: python3-jsonpointer = %{version}-%{release}
57 Requires: %{name} = %{version}-%{release}
60 %description -n jsonpointer
61 Tool to resolve JSON Pointers according to RFC 6901.
63 %description -n jsonpointer -l pl.UTF-8
64 Narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
67 %setup -q -n jsonpointer-%{version}
71 %py_build %{?with_tests:test}
75 %py3_build %{?with_tests:test}
79 rm -rf $RPM_BUILD_ROOT
88 # install may not overwrite existing file
89 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
94 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
99 %doc AUTHORS LICENSE.txt README.md
100 %{py_sitescriptdir}/jsonpointer.py[co]
101 %{py_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
105 %files -n python3-jsonpointer
106 %defattr(644,root,root,755)
107 %doc AUTHORS LICENSE.txt README.md
108 %{py3_sitescriptdir}/jsonpointer.py
109 %{py3_sitescriptdir}/__pycache__/jsonpointer.cpython-*.py[co]
110 %{py3_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
113 %files -n jsonpointer
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_bindir}/jsonpointer