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