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 Name: python-jsonpointer
12 Group: Libraries/Python
13 Source0: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
14 # Source0-md5: d68c0c6ad6889e9c94ec0feba719e45e
15 URL: https://pypi.python.org/pypi/jsonpointer
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-setuptools
22 BuildRequires: python3-setuptools
24 Requires: python-modules
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Library to resolve JSON Pointers according to RFC 6901.
31 %package -n python3-jsonpointer
32 Summary: Identify specific nodes in a JSON document (RFC 6901)
33 Group: Libraries/Python
34 Requires: python3-modules
36 %description -n python3-jsonpointer
37 Library to resolve JSON Pointers according to RFC 6901.
39 %package -n jsonpointer
40 Summary: Identify specific nodes in a JSON document (RFC 6901)
41 Group: Libraries/Python
43 Requires: python3-jsonpointer = %{version}-%{release}
45 Requires: %{name} = %{version}-%{release}
48 %description -n jsonpointer
49 Tool to resolve JSON Pointers according to RFC 6901.
52 %setup -q -n jsonpointer-%{version}
56 %py_build %{?with_tests:test}
60 %py3_build %{?with_tests:test}
64 rm -rf $RPM_BUILD_ROOT
73 # install may not overwrite existing file
74 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
79 rm -rf $RPM_BUILD_ROOT
83 %defattr(644,root,root,755)
84 %doc AUTHORS README.md
85 %{py_sitescriptdir}/jsonpointer.py[co]
86 %{py_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
90 %files -n python3-jsonpointer
91 %defattr(644,root,root,755)
92 %doc AUTHORS README.md
93 %{py3_sitescriptdir}/jsonpointer.py
94 %{py3_sitescriptdir}/__pycache__/*
95 %{py3_sitescriptdir}/jsonpointer-%{version}-py*.egg-info
99 %defattr(644,root,root,755)
100 %doc AUTHORS README.md
101 %attr(755,root,root) %{_bindir}/jsonpointer