]> git.pld-linux.org Git - packages/python-jsonpointer.git/blob - python-jsonpointer.spec
7be6d765bc26c49b0105c7a0fb30147b70c1b293
[packages/python-jsonpointer.git] / python-jsonpointer.spec
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
7 Summary:        Identify specific nodes in a JSON document (RFC 6901)
8 Name:           python-jsonpointer
9 Version:        1.10
10 Release:        3
11 License:        BSD
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
18 %if %{with python2}
19 BuildRequires:  python-setuptools
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-setuptools
23 %endif
24 Requires:       python-modules
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Library to resolve JSON Pointers according to RFC 6901.
30
31 %package -n python3-jsonpointer
32 Summary:        Identify specific nodes in a JSON document (RFC 6901)
33 Group:          Libraries/Python
34 Requires:       python3-modules
35
36 %description -n python3-jsonpointer
37 Library to resolve JSON Pointers according to RFC 6901.
38
39 %package -n jsonpointer
40 Summary:        Identify specific nodes in a JSON document (RFC 6901)
41 Group:          Libraries/Python
42 %if %{with python3}
43 Requires:       python3-jsonpointer = %{version}-%{release}
44 %else
45 Requires:       %{name} = %{version}-%{release}
46 %endif
47
48 %description -n jsonpointer
49 Tool 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
64 rm -rf $RPM_BUILD_ROOT
65
66 %if %{with python2}
67 %py_install
68
69 %py_postclean
70 %endif
71
72 %if %{with python3}
73 # install may not overwrite existing file
74 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
75 %py3_install
76 %endif
77
78 %clean
79 rm -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.065627 seconds and 2 git commands to generate.