]> git.pld-linux.org Git - packages/python-jsonpointer.git/blame - python-jsonpointer.spec
- rebuild with python 3.8
[packages/python-jsonpointer.git] / python-jsonpointer.spec
CommitLineData
dabf2d86
JK
1#
2# Conditional build:
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
6
7Summary: Identify specific nodes in a JSON document (RFC 6901)
8Name: python-jsonpointer
9Version: 1.10
e6f26136 10Release: 4
dabf2d86
JK
11License: BSD
12Group: Libraries/Python
13Source0: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
14# Source0-md5: d68c0c6ad6889e9c94ec0feba719e45e
15URL: https://pypi.python.org/pypi/jsonpointer
16BuildRequires: rpm-pythonprov
17BuildRequires: rpmbuild(macros) >= 1.714
18%if %{with python2}
19BuildRequires: python-setuptools
20%endif
21%if %{with python3}
22BuildRequires: python3-setuptools
23%endif
24Requires: python-modules
25BuildArch: noarch
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Library to resolve JSON Pointers according to RFC 6901.
30
31%package -n python3-jsonpointer
32Summary: Identify specific nodes in a JSON document (RFC 6901)
33Group: Libraries/Python
34Requires: python3-modules
35
36%description -n python3-jsonpointer
37Library to resolve JSON Pointers according to RFC 6901.
38
39%package -n jsonpointer
40Summary: Identify specific nodes in a JSON document (RFC 6901)
41Group: Libraries/Python
42%if %{with python3}
43Requires: python3-jsonpointer = %{version}-%{release}
44%else
45Requires: %{name} = %{version}-%{release}
46%endif
47
48%description -n jsonpointer
49Tool to resolve JSON Pointers according to RFC 6901.
50
51%prep
52%setup -q -n jsonpointer-%{version}
53
54%build
55%if %{with python2}
56%py_build %{?with_tests:test}
57%endif
58
59%if %{with python3}
60%py3_build %{?with_tests:test}
61%endif
62
63%install
64rm -rf $RPM_BUILD_ROOT
65
66%if %{with python2}
67%py_install
68
69%py_postclean
70%endif
71
72%if %{with python3}
73252ca2
JR
73# install may not overwrite existing file
74%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
dabf2d86
JK
75%py3_install
76%endif
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%files
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
87%endif
88
89%if %{with python3}
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
96%endif
97
98%files -n jsonpointer
99%defattr(644,root,root,755)
100%doc AUTHORS README.md
101%attr(755,root,root) %{_bindir}/jsonpointer
This page took 0.086531 seconds and 4 git commands to generate.