switch to python3 instead of python2

This commit is contained in:
eaglegai 2020-10-29 19:59:04 +08:00
parent 056aa7ce2a
commit 5bb1e56b69
2 changed files with 3072 additions and 12 deletions

View File

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

File diff suppressed because it is too large Load Diff