!6 delete about python2 subpackage and use python3 replace python2 for build

From: @yeah_wang
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2020-10-29 19:16:29 +08:00 committed by Gitee
commit 4eaad50795

View File

@ -1,6 +1,6 @@
Name: python-ipaddress Name: python-ipaddress
Version: 1.0.23 Version: 1.0.23
Release: 1 Release: 2
Summary: IPv4/IPv6 manipulation library Summary: IPv4/IPv6 manipulation library
License: Python License: Python
URL: https://github.com/phihag/ipaddress URL: https://github.com/phihag/ipaddress
@ -8,73 +8,36 @@ Source0: https://pypi.io/packages/source/i/ipaddress/ipaddress-%{versio
BuildArch: noarch BuildArch: noarch
%if 0%{?with_python2}
BuildRequires: python2-devel python2-setuptools
%endif
%if 0%{?with_python3}
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
%endif
%description %description
Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2. Python 3.3+'s ipaddress for Python 2.6, 2.7, 3.2.
%if 0%{?with_python2}
%package -n python2-ipaddress
Summary: Python2 package for python-ipaddress
Provides: python-ipaddress = %{version}-%{release}
Obsoletes: python-ipaddress < %{version}-%{release}
%description -n python2-ipaddress
Python2 package for python-ipaddress
%endif
%if 0%{?with_python3}
%package -n python3-ipaddress %package -n python3-ipaddress
Summary: Python3 package for python-ipaddress Summary: Python3 package for python-ipaddress
%description -n python3-ipaddress %description -n python3-ipaddress
Python3 package for python-ipaddress Python3 package for python-ipaddress
%endif
%prep %prep
%autosetup -n ipaddress-%{version} -p1 %autosetup -n ipaddress-%{version} -p1
%build %build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build %py3_build
%endif
%install %install
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install %py3_install
%endif
%if 0%{?with_python2}
%files -n python2-ipaddress
%defattr(-,root,root)
%doc README.md
%license LICENSE
%{python2_sitelib}/*
%endif
%if 0%{?with_python3}
%files -n python3-ipaddress %files -n python3-ipaddress
%defattr(-,root,root) %defattr(-,root,root)
%doc README.md %doc README.md
%license LICENSE %license LICENSE
%{python3_sitelib}/* %{python3_sitelib}/*
%endif
%changelog %changelog
* Thu Oct 29 2020 wangye <wangye70@huawei.com> - 1.0.23-2
- remove python2-ipaddress subpackage
* Mon Jul 20 2020 wangye <wangye70@huawei.com> - 1.0.23-1 * Mon Jul 20 2020 wangye <wangye70@huawei.com> - 1.0.23-1
- Type:bugfix - Type:bugfix
- Id:NA - Id:NA