]>
Commit | Line | Data |
---|---|---|
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 | ||
7 | Summary: Identify specific nodes in a JSON document (RFC 6901) | |
9308dfa6 | 8 | Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901) |
dabf2d86 | 9 | Name: python-jsonpointer |
36fd1286 | 10 | Version: 2.2 |
83b3b3a6 | 11 | Release: 3 |
dabf2d86 JK |
12 | License: BSD |
13 | Group: Libraries/Python | |
9308dfa6 | 14 | #Source0Download: https://pypi.org/simple/jsonpointer/ |
dabf2d86 | 15 | Source0: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz |
36fd1286 | 16 | # Source0-md5: 57483634e284ca98b10079b94d729c9c |
9308dfa6 | 17 | URL: https://pypi.org/project/jsonpointer/ |
dabf2d86 JK |
18 | BuildRequires: rpm-pythonprov |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
9308dfa6 | 21 | BuildRequires: python-modules >= 1:2.7 |
dabf2d86 JK |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
36fd1286 | 25 | BuildRequires: python3-modules >= 1:3.5 |
dabf2d86 JK |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
9308dfa6 | 28 | Requires: python-modules >= 1:2.7 |
dabf2d86 JK |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | Library to resolve JSON Pointers according to RFC 6901. | |
34 | ||
9308dfa6 JB |
35 | %description -l pl.UTF-8 |
36 | Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901. | |
37 | ||
dabf2d86 JK |
38 | %package -n python3-jsonpointer |
39 | Summary: Identify specific nodes in a JSON document (RFC 6901) | |
9308dfa6 | 40 | Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901) |
dabf2d86 | 41 | Group: Libraries/Python |
36fd1286 | 42 | Requires: python3-modules >= 1:3.5 |
dabf2d86 JK |
43 | |
44 | %description -n python3-jsonpointer | |
45 | Library to resolve JSON Pointers according to RFC 6901. | |
46 | ||
9308dfa6 JB |
47 | %description -n python3-jsonpointer -l pl.UTF-8 |
48 | Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901. | |
49 | ||
dabf2d86 JK |
50 | %package -n jsonpointer |
51 | Summary: Identify specific nodes in a JSON document (RFC 6901) | |
9308dfa6 JB |
52 | Summary(pl.UTF-8): Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901) |
53 | Group: Applications/Text | |
dabf2d86 JK |
54 | %if %{with python3} |
55 | Requires: python3-jsonpointer = %{version}-%{release} | |
56 | %else | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | %endif | |
59 | ||
60 | %description -n jsonpointer | |
61 | Tool to resolve JSON Pointers according to RFC 6901. | |
62 | ||
9308dfa6 JB |
63 | %description -n jsonpointer -l pl.UTF-8 |
64 | Narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC 6901. | |
65 | ||
dabf2d86 JK |
66 | %prep |
67 | %setup -q -n jsonpointer-%{version} | |
68 | ||
69 | %build | |
70 | %if %{with python2} | |
71 | %py_build %{?with_tests:test} | |
72 | %endif | |
73 | ||
74 | %if %{with python3} | |
75 | %py3_build %{?with_tests:test} | |
76 | %endif | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %if %{with python2} | |
82 | %py_install | |
83 | ||
84 | %py_postclean | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
73252ca2 JR |
88 | # install may not overwrite existing file |
89 | %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer | |
dabf2d86 JK |
90 | %py3_install |
91 | %endif | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %if %{with python2} | |
97 | %files | |
98 | %defattr(644,root,root,755) | |
9308dfa6 | 99 | %doc AUTHORS LICENSE.txt README.md |
dabf2d86 JK |
100 | %{py_sitescriptdir}/jsonpointer.py[co] |
101 | %{py_sitescriptdir}/jsonpointer-%{version}-py*.egg-info | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %files -n python3-jsonpointer | |
106 | %defattr(644,root,root,755) | |
9308dfa6 | 107 | %doc AUTHORS LICENSE.txt README.md |
dabf2d86 | 108 | %{py3_sitescriptdir}/jsonpointer.py |
9308dfa6 | 109 | %{py3_sitescriptdir}/__pycache__/jsonpointer.cpython-*.py[co] |
dabf2d86 JK |
110 | %{py3_sitescriptdir}/jsonpointer-%{version}-py*.egg-info |
111 | %endif | |
112 | ||
113 | %files -n jsonpointer | |
114 | %defattr(644,root,root,755) | |
dabf2d86 | 115 | %attr(755,root,root) %{_bindir}/jsonpointer |