!4 remove python2 dependency

From: @xinghe_1
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-10-30 15:45:41 +08:00 committed by Gitee
commit f0feb6af28

View File

@ -1,12 +1,12 @@
Name: sanlock Name: sanlock
Version: 3.8.1 Version: 3.8.1
Release: 1 Release: 2
Summary: A shared storage lock manager Summary: A shared storage lock manager
License: GPLv2 and GPLv2+ and LGPLv2+ License: GPLv2 and GPLv2+ and LGPLv2+
URL: https://pagure.io/sanlock/ URL: https://pagure.io/sanlock/
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
BuildRequires: libblkid-devel libaio-devel python2 python2-devel systemd-units BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units
Requires(pre): shadow Requires(pre): shadow
Requires(post): systemd-units systemd-sysv Requires(post): systemd-units systemd-sysv
Requires(preun): systemd-units Requires(preun): systemd-units
@ -36,21 +36,17 @@ Requires: %{name} = %{version}-%{release}
%description help %description help
The sanklock-help package contains maninfo for sanlock. The sanklock-help package contains maninfo for sanlock.
%package -n python3-sanlock
%package -n python2-sanlock %{?python_provide:%python_provide python3-sanlock}
%{?python_provide:%python_provide python2-sanlock} Summary: Python bindings for the sanlock library
Provides: %{name}-python = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python bindings for the sanlock library %description -n python3-sanlock
Requires: %{name} = %{version}-%{release} The python3-sanlock package contains a module that
%description -n python2-sanlock
The python2-sanlock package contains a module that
permits applications written in the Python programming language permits applications written in the Python programming language
to use the interface supplied by the sanlock library. to use the interface supplied by the sanlock library.
%package -n sanlk-reset %package -n sanlk-reset
Summary: Host reset daemon and client using sanlock Summary: Host reset daemon and client using sanlock
Requires: sanlock = %{version}-%{release} Requires: sanlock = %{version}-%{release}
@ -68,13 +64,13 @@ common sanlock lockspace.
%set_build_flags %set_build_flags
CFLAGS=$RPM_OPT_FLAGS make -C wdmd CFLAGS=$RPM_OPT_FLAGS make -C wdmd
CFLAGS=$RPM_OPT_FLAGS make -C src CFLAGS=$RPM_OPT_FLAGS make -C src
CFLAGS=$RPM_OPT_FLAGS make -C python CFLAGS=$RPM_OPT_FLAGS make -C python PY_VERSION=3
CFLAGS=$RPM_OPT_FLAGS make -C reset CFLAGS=$RPM_OPT_FLAGS make -C reset
%install %install
make -C src install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT make -C src install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
make -C wdmd install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT make -C wdmd install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
make -C python install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT make -C python install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT PY_VERSION=3
make -C reset install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT make -C reset install LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT
install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service
@ -141,10 +137,10 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%{_includedir}/sanlock*.h %{_includedir}/sanlock*.h
%{_libdir}/pkgconfig/libsanlock*.pc %{_libdir}/pkgconfig/libsanlock*.pc
%files -n python2-sanlock %files -n python3-sanlock
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitearch}/sanlock_python-*.egg-info %{python3_sitearch}/sanlock_python-*.egg-info
%{python_sitearch}/sanlock.so %{python3_sitearch}/sanlock*.so
%files -n sanlk-reset %files -n sanlk-reset
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -154,6 +150,9 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%changelog %changelog
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-2
- remove python2 dependency
* Thu Jul 16 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-1 * Thu Jul 16 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-1
- update package to 3.8.1 - update package to 3.8.1