remove python2

This commit is contained in:
zhangtao2020 2020-10-30 10:19:18 +08:00
parent c9b9498aef
commit 6ef2f730ca

View File

@ -1,8 +1,7 @@
%bcond_with python2
%bcond_without python3 %bcond_without python3
Name: python-dockerpty Name: python-dockerpty
Version: 0.4.1 Version: 0.4.1
Release: 2 Release: 3
Summary: Python library to use the pseudo-tty of a docker container Summary: Python library to use the pseudo-tty of a docker container
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/d11wtq/dockerpty URL: https://github.com/d11wtq/dockerpty
@ -14,18 +13,6 @@ BuildArch: noarch
Provides the functionality needed to operate the pseudo-tty (PTY) allocated Provides the functionality needed to operate the pseudo-tty (PTY) allocated
to a docker container, using the Python client to a docker container, using the Python client
%if %{with python2}
%package -n python2-dockerpty
Summary: Python library to use the pseudo-tty of a docker container
BuildRequires: python2-devel python2-setuptools
Requires: python2-six
%{?python_provide:%python_provide python2-dockerpty}
%description -n python2-dockerpty
Provides the functionality needed to operate the pseudo-tty (PTY) allocated
to a docker container, using the Python client
%endif
%if %{with python3} %if %{with python3}
%package -n python3-dockerpty %package -n python3-dockerpty
Summary: Python library to use the pseudo-tty of a docker container Summary: Python library to use the pseudo-tty of a docker container
@ -44,26 +31,11 @@ to a docker container, using the Python client
%autosetup -n dockerpty-%{version} %autosetup -n dockerpty-%{version}
%build %build
%if %{with python2}
%_bindir/python2 setup.py build '--executable=%_bindir/python2 -s'
%endif
%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s' %_bindir/python3 setup.py build '--executable=%_bindir/python3 -s'
%install %install
%if %{with python2}
%_bindir/python2 setup.py install -O1 --skip-build --root %buildroot
%endif
%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot %_bindir/python3 setup.py install -O1 --skip-build --root %buildroot
%if %{with python2}
%files -n python2-dockerpty
%defattr(-,root,root)
%license LICENSE.txt
%_prefix/lib/python2.7/site-packages/dockerpty
%_prefix/lib/python2.7/site-packages/dockerpty-%{version}-py%{python2_version}.egg-info
%endif
%if %{with python3} %if %{with python3}
%files -n python3-dockerpty %files -n python3-dockerpty
%defattr(-,root,root) %defattr(-,root,root)
@ -77,6 +49,9 @@ to a docker container, using the Python client
%doc README.md MANIFEST.in %doc README.md MANIFEST.in
%changelog %changelog
* Thu Oct 22 2020 zhangtao<zhangtao221@huawei.com> - 0.4.1-3
- delete python2
* Tue Jun 16 2020 hanhui<hanhui15@huawei.com> - 0.4.1-2 * Tue Jun 16 2020 hanhui<hanhui15@huawei.com> - 0.4.1-2
- fix python3 can not find path - fix python3 can not find path