!33 remove python2
From: @jlwwlsqc Reviewed-by: @hanxinke Signed-off-by: @hanxinke
This commit is contained in:
commit
e42b692b8e
@ -1,4 +1,3 @@
|
||||
%bcond_without python2
|
||||
%global srcname pip
|
||||
%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
|
||||
%global python_wheeldir %{_datadir}/python-wheels
|
||||
@ -7,7 +6,7 @@ pip is the package installer for Python. You can use pip to install packages fro
|
||||
%global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d})
|
||||
Name: python-%{srcname}
|
||||
Version: 20.2.2
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: A tool for installing and managing Python packages
|
||||
License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
|
||||
URL: http://www.pip-installer.org
|
||||
@ -21,14 +20,6 @@ Source10: pip-allow-older-versions.patch
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n python2-%{srcname}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python2-devel python2-setuptools ca-certificates
|
||||
Requires: python2-setuptools ca-certificates
|
||||
BuildRequires: python2-pip python2-wheel
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
%description -n python2-%{srcname} %{_description}
|
||||
|
||||
%package -n python%{python3_pkgversion}-%{srcname}
|
||||
Summary: %{summary}
|
||||
BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools bash-completion ca-certificates
|
||||
@ -50,7 +41,6 @@ A Python wheel of pip to use with venv
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build_wheel
|
||||
|
||||
%install
|
||||
@ -63,17 +53,6 @@ A Python wheel of pip to use with venv
|
||||
--find-links dist \
|
||||
'pip==%{version}'
|
||||
|
||||
rm %{buildroot}%{_bindir}/pip
|
||||
|
||||
%{__python2} dist/%{python_wheelname}/pip install \
|
||||
--root %{buildroot} \
|
||||
--no-deps \
|
||||
--no-cache-dir \
|
||||
--no-index \
|
||||
--ignore-installed \
|
||||
--find-links dist \
|
||||
'pip==%{version}'
|
||||
|
||||
%if %{with doc}
|
||||
pushd docs/build/man
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
@ -112,17 +91,10 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-20.2.2.dist-info/INSTALLER
|
||||
mkdir -p %{buildroot}%{python_wheeldir}
|
||||
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/pip
|
||||
%{_bindir}/pip2
|
||||
%{_bindir}/pip%{python2_version}
|
||||
%{python2_sitelib}/pip*
|
||||
%dir %{bashcompdir}
|
||||
%dir %(dirname %{bashcompdir})
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/pip
|
||||
%{_bindir}/pip3
|
||||
%{_bindir}/pip-3*
|
||||
%{_bindir}/pip%{python3_version}
|
||||
@ -140,6 +112,12 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||
%{python_wheeldir}/%{python_wheelname}
|
||||
|
||||
%changelog
|
||||
* Wed Nov 4 2020 wangjie<wangjie294@huawei.com> -20.2.2-3
|
||||
- Type:NA
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:remove python2
|
||||
|
||||
* Tue Sep 1 2020 wenzhanli<wenzhanli2@huawei.com> - 20.2.2-2
|
||||
- add pip-allow-older-versions.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user