]> git.pld-linux.org Git - SPECS.git/blob - python-jsonpointer.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.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 Summary(pl.UTF-8):      Identyfikowanie określonych węzłów w dokumencie JSON (RFC 6901)
9 Name:           python-jsonpointer
10 Version:        2.0
11 Release:        2
12 License:        BSD
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
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.4
26 BuildRequires:  python3-setuptools
27 %endif
28 Requires:       python-modules >= 1:2.7
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
35 %description -l pl.UTF-8
36 Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
37
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
43
44 %description -n python3-jsonpointer
45 Library to resolve JSON Pointers according to RFC 6901.
46
47 %description -n python3-jsonpointer -l pl.UTF-8
48 Biblioteka do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
49
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
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
63 %description -n jsonpointer -l pl.UTF-8
64 Narzędzie do rozwiązywania wskaźników JSON zgodnie z RFC 6901.
65
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}
88 # install may not overwrite existing file
89 %{__rm} -f $RPM_BUILD_ROOT%{_bindir}/jsonpointer
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)
99 %doc AUTHORS LICENSE.txt README.md
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)
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
111 %endif
112
113 %files -n jsonpointer
114 %defattr(644,root,root,755)
115 %attr(755,root,root) %{_bindir}/jsonpointer
This page took 0.040781 seconds and 3 git commands to generate.