]> git.pld-linux.org Git - packages/python-jmespath.git/blob - python-jmespath.spec
rebuild with python 3.10
[packages/python-jmespath.git] / python-jmespath.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (not included in sdist)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         pypi_name       jmespath
8 Summary:        JSON Matching Expressions
9 Summary(pl.UTF-8):      JSON Matching Expressions - wyrażenia dopasowujące JSON
10 Name:           python-%{pypi_name}
11 Version:        0.10.0
12 Release:        5
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/jmespath/
16 Source0:        https://files.pythonhosted.org/packages/source/j/jmespath/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  65bdcb5fa5bcf1cc710ffa508e78e408
18 URL:            https://github.com/jmespath/jmespath.py
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-mock
24 BuildRequires:  python-nose
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.3
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-nose
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.6
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 JMESPath allows you to declaratively specify how to extract elements
42 from a JSON document.
43
44 %description -l pl.UTF-8
45 JMESPath pozwala deklaratywnie określać sposób wydobywania elementów z
46 dokumentów JSON.
47
48 %package -n python3-%{pypi_name}
49 Summary:        JSON Matching Expressions
50 Summary(pl.UTF-8):      JSON Matching Expressions - wyrażenia dopasowujące JSON
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.3
53
54 %description -n python3-%{pypi_name}
55 JMESPath allows you to declaratively specify how to extract elements
56 from a JSON document.
57
58 %description -n python3-%{pypi_name} -l pl.UTF-8
59 JMESPath pozwala deklaratywnie określać sposób wydobywania elementów z
60 dokumentów JSON.
61
62 %prep
63 %setup -q -n %{pypi_name}-%{version}
64
65 %{__rm} -r %{pypi_name}.egg-info
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 nosetests-%{py_ver}
73 %endif
74 %endif
75
76 %if %{with python3}
77 %py3_build
78
79 %if %{with tests}
80 nosetests-%{py3_ver}
81 %endif
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python3}
88 %py3_install
89
90 %{__mv} $RPM_BUILD_ROOT%{_bindir}/jp.py $RPM_BUILD_ROOT%{_bindir}/jp.py-3
91 %endif
92
93 %if %{with python2}
94 %py_install
95
96 %{__mv} $RPM_BUILD_ROOT%{_bindir}/jp.py $RPM_BUILD_ROOT%{_bindir}/jp.py-2
97 ln -sf jp.py-2 $RPM_BUILD_ROOT%{_bindir}/jp.py
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc LICENSE.txt README.rst
107 %attr(755,root,root) %{_bindir}/jp.py
108 %attr(755,root,root) %{_bindir}/jp.py-2
109 %{py_sitescriptdir}/jmespath
110 %{py_sitescriptdir}/jmespath-%{version}-py%{py_ver}.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-%{pypi_name}
115 %defattr(644,root,root,755)
116 %doc LICENSE.txt README.rst
117 %attr(755,root,root) %{_bindir}/jp.py-3
118 %{py3_sitescriptdir}/jmespath
119 %{py3_sitescriptdir}/jmespath-%{version}-py%{py3_ver}.egg-info
120 %endif
This page took 0.057885 seconds and 3 git commands to generate.