commit 13d4cd9753121944444637c551306a9f26fadcab Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:54:09 2019 +0800 Package init diff --git a/jmespath-0.9.0.tar.gz b/jmespath-0.9.0.tar.gz new file mode 100644 index 0000000..d2439d8 Binary files /dev/null and b/jmespath-0.9.0.tar.gz differ diff --git a/python-jmespath.spec b/python-jmespath.spec new file mode 100644 index 0000000..2b4a266 --- /dev/null +++ b/python-jmespath.spec @@ -0,0 +1,85 @@ +%bcond_without python3 + +Name: python-jmespath +Version: 0.9.0 +Release: 13 +Summary: Matching Expressions for JSON +License: MIT +URL: https://github.com/jmespath/jmespath.py +Source0: https://pypi.python.org/packages/source/j/jmespath/jmespath-%{version}.tar.gz +BuildArch: noarch + +%description +JMESPath is a python library which allows you to declaratively specify how to +extract elements from a JSON document. + +%package -n python2-jmespath +Summary: Match Expressions of JSON +%{?el6:Provides: python-jmespathi} +%{?python_provide:%python_provide python2-jmespath} + +BuildRequires: python2-devel python2-mock python2-nose python2-setuptools + +%description -n python2-jmespath +JMESPath is a python library which allows you to declaratively specify how to +extract elements from a JSON document. + +%if %{with python3} +%package -n python3-jmespath +Summary: JSON Matching Expressions +%{?python_provide:%python_provide python3-jmespath} + +BuildRequires: python3-devel python3-mock python3-nose python3-setuptools + +%description -n python3-jmespath +JMESPath is a python library which allows you to declaratively specify how to +extract elements from a JSON document. +%endif + +%prep +%setup -q -n jmespath-%{version} +rm -rf jmespath.egg-info + +%build +%py2_build +%if %{with python3} +%py3_build +%endif + +%install +%if %{with python3} +%py3_install +mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python3_version} +ln -sf %{_bindir}/jp.py-%{python3_version} %{buildroot}/%{_bindir}/jp.py-3 +%endif + +%py2_install +mv %{buildroot}/%{_bindir}/jp.py %{buildroot}/%{_bindir}/jp.py-%{python2_version} +ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py-2 +ln -sf %{_bindir}/jp.py-%{python2_version} %{buildroot}/%{_bindir}/jp.py + +%check +nosetests +%if %{with python3} +nosetests-%{python3_version} +%endif + +%files -n python2-jmespath +%doc README.rst LICENSE.txt +%{_bindir}/jp.py +%{_bindir}/jp.py-2 +%{_bindir}/jp.py-%{python2_version} +%{python2_sitelib}/jmespath* + +%if %{with python3} +%files -n python3-jmespath +%doc README.rst LICENSE.txt +%{_bindir}/jp.py-3 +%{_bindir}/jp.py-%{python3_version} +%{python3_sitelib}/jmespath* +%endif + +%changelog +* Sat Nov 16 2019 yanzhihua - 0.9.0-13 +- Package init +