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
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}
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
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-setuptools
23 BuildRequires: python-mock
24 BuildRequires: python-nose
28 BuildRequires: python3-modules >= 1:3.3
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-nose
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.714
36 Requires: python-modules >= 1:2.6
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 JMESPath allows you to declaratively specify how to extract elements
44 %description -l pl.UTF-8
45 JMESPath pozwala deklaratywnie określać sposób wydobywania elementów z
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
54 %description -n python3-%{pypi_name}
55 JMESPath allows you to declaratively specify how to extract elements
58 %description -n python3-%{pypi_name} -l pl.UTF-8
59 JMESPath pozwala deklaratywnie określać sposób wydobywania elementów z
63 %setup -q -n %{pypi_name}-%{version}
65 %{__rm} -r %{pypi_name}.egg-info
85 rm -rf $RPM_BUILD_ROOT
90 %{__mv} $RPM_BUILD_ROOT%{_bindir}/jp.py $RPM_BUILD_ROOT%{_bindir}/jp.py-3
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
101 rm -rf $RPM_BUILD_ROOT
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
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