remove python2 subPackage

This commit is contained in:
caodongxia 2020-11-19 10:19:39 +08:00
parent 13d4cd9753
commit c998912872

View File

@ -1,8 +1,6 @@
%bcond_without python3
Name: python-jmespath
Version: 0.9.0
Release: 13
Release: 14
Summary: Matching Expressions for JSON
License: MIT
URL: https://github.com/jmespath/jmespath.py
@ -13,18 +11,6 @@ BuildArch: noarch
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}
@ -34,52 +20,33 @@ 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
* Thu Nov 19 2020 caodongxia <caodongxia@huawei.com> - 0.9.0-14
- Remove python2 subPackage
* Sat Nov 16 2019 yanzhihua <yanzhihua4@huawei.com> - 0.9.0-13
- Package init