!7 remove python2

From: @jlwwlsqc
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-11-02 16:08:14 +08:00 committed by Gitee
commit 47be42c64e

View File

@ -1,7 +1,7 @@
%bcond_with bootstrap %bcond_with bootstrap
Name: python-wheel Name: python-wheel
Version: 0.31.1 Version: 0.31.1
Release: 4 Release: 5
Epoch: 1 Epoch: 1
Summary: Built-package format for Python Summary: Built-package format for Python
License: MIT License: MIT
@ -17,22 +17,6 @@ A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376 .whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format. compatible install in a way that is very close to the on-disk format.
%package -n python2-wheel
Summary: Built-package format for Python
BuildRequires: python2-devel python2-setuptools
%if ! %{with bootstrap}
BuildRequires: python2-pytest python2-pyxdg python2-keyring
%endif
%{?python_provide:%python_provide python2-wheel}
%description -n python2-wheel
A built-package format for Python.
A wheel is a ZIP-format archive with a specially formatted filename and the
.whl extension. It is designed to contain all the files for a PEP 376
compatible install in a way that is very close to the on-disk format.
Python 2 version.
%package -n python3-wheel %package -n python3-wheel
Summary: Built-package format for Python Summary: Built-package format for Python
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
@ -64,7 +48,6 @@ sed -ie '1d' wheel/{egg2wheel,wininst2wheel}.py
%build %build
%py2_build
%py3_build %py3_build
%if %{without bootstrap} %if %{without bootstrap}
@ -77,11 +60,6 @@ sed -ie '1d' wheel/{egg2wheel,wininst2wheel}.py
mv %{buildroot}%{_bindir}/wheel{,-%{python3_version}} mv %{buildroot}%{_bindir}/wheel{,-%{python3_version}}
ln -s wheel-%{python3_version} %{buildroot}%{_bindir}/wheel-3 ln -s wheel-%{python3_version} %{buildroot}%{_bindir}/wheel-3
%py2_install
mv %{buildroot}%{_bindir}/wheel{,-%{python2_version}}
ln -s wheel-%{python2_version} %{buildroot}%{_bindir}/wheel-2
ln -s wheel-2 %{buildroot}%{_bindir}/wheel
%if %{without bootstrap} %if %{without bootstrap}
install -d %{buildroot}%{_datadir}/python-wheels install -d %{buildroot}%{_datadir}/python-wheels
install -p dist/wheel-%{version}-py2.py3-none-any.whl -t %{buildroot}%{_datadir}/python-wheels install -p dist/wheel-%{version}-py2.py3-none-any.whl -t %{buildroot}%{_datadir}/python-wheels
@ -90,18 +68,10 @@ install -p dist/wheel-%{version}-py2.py3-none-any.whl -t %{buildroot}%{_datadir}
%check %check
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
rm setup.cfg rm setup.cfg
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -v --ignore build
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
%endif %endif
%files -n python2-wheel
%license LICENSE.txt
%doc CHANGES.txt README.rst
%{_bindir}/wheel
%{_bindir}/wheel-2*
%{python2_sitelib}/wheel*
%files -n python3-wheel %files -n python3-wheel
%license LICENSE.txt %license LICENSE.txt
%doc CHANGES.txt README.rst %doc CHANGES.txt README.rst
@ -116,5 +86,11 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -v --ignore build
%endif %endif
%changelog %changelog
* Mon Nov 2 2020 wangjie<wangjie294@huawei.com> -0.31.1-5
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2
* Mon Dec 2 2019 yangjian<yangjian79@huawei.com> - 1:0.31.1-4 * Mon Dec 2 2019 yangjian<yangjian79@huawei.com> - 1:0.31.1-4
- Package init - Package init