!4 switch python2 to python3

From: @eaglegai
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2020-10-30 10:40:58 +08:00 committed by Gitee
commit a00bb25c32
2 changed files with 3072 additions and 12 deletions

View File

@ -1,6 +1,6 @@
Name: libdnet
Version: 1.12
Release: 29
Release: 30
Summary: Simple portable interface work with low-level networking routines
License: BSD
@ -9,8 +9,8 @@ Source: http://src.fedoraproject.org/repo/pkgs/libdnet/libdnet-1.12.tgz/9253e
Patch0: %{name}-shrext.patch
Patch1: dnet-config-multilib.patch
Patch9000: add-sorted-function-remove-differences.patch
Patch2: add-sorted-function-remove-differences.patch
Patch3: remove-python2-support-and-add-python3-support.patch
BuildRequires: gcc-c++
%description
@ -34,16 +34,16 @@ Requires: %{name} = %{version}-%{release}
%description progs
%{name}-progs contains sample applications that want to make use of %{name}
%package -n python2-%{name}
%{?python_provide:%python_provide python2-%{name}}
%package -n python3-%{name}
%{?python_provide:%python_provide python3-%{name}}
Provides: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-python
Summary: Python bindings for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: python2-devel
BuildRequires: python3-devel
%description -n python2-%{name}
Python2 package for python-%{name}
%description -n python3-%{name}
Python3 package for python-%{name}
%package_help
@ -58,14 +58,14 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%make_build
pushd python
%{__python2} setup.py build
%{__python3} setup.py build
popd
%install
%{__make} install DESTDIR=%{buildroot}
pushd python
%{__python2} setup.py install --skip-build --root %{buildroot}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%delete_la
@ -89,9 +89,9 @@ popd
%defattr(-,root,root)
%{_sbindir}/*
%files -n python2-%{name}
%files -n python3-%{name}
%defattr(-,root,root)
%{python2_sitearch}/*
%{python3_sitearch}/*
%files help
%defattr(-,root,root)
@ -100,6 +100,12 @@ popd
%{_mandir}/man8/*.8*
%changelog
* Thu Oct 29 2020 gaihuiying <gaihuiying1@huawei.com> - 1.12 - 30
- Type:rquirement
- ID:NA
- SUG:NA
- DESC:remove python2, and switch to python3
* Fri Sep 11 2020 lunankun <lunankun@huawei.com> - 1.12 - 29
- Type:bugfix
- ID:NA

File diff suppressed because it is too large Load Diff