remove python2 dependency

This commit is contained in:
19909236985 2020-10-30 14:44:26 +08:00
parent 4f4d13ac17
commit d1e5678564

View File

@ -1,12 +1,12 @@
Name: sanlock
Version: 3.8.1
Release: 1
Release: 2
Summary: A shared storage lock manager
License: GPLv2 and GPLv2+ and LGPLv2+
URL: https://pagure.io/sanlock/
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(post): systemd-units systemd-sysv
Requires(preun): systemd-units
@ -36,21 +36,17 @@ Requires: %{name} = %{version}-%{release}
%description help
The sanklock-help package contains maninfo for sanlock.
%package -n python2-sanlock
%{?python_provide:%python_provide python2-sanlock}
Provides: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python bindings for the sanlock library
Requires: %{name} = %{version}-%{release}
%description -n python2-sanlock
The python2-sanlock package contains a module that
%package -n python3-sanlock
%{?python_provide:%python_provide python3-sanlock}
Summary: Python bindings for the sanlock library
Requires: %{name} = %{version}-%{release}
%description -n python3-sanlock
The python3-sanlock package contains a module that
permits applications written in the Python programming language
to use the interface supplied by the sanlock library.
%package -n sanlk-reset
Summary: Host reset daemon and client using sanlock
Requires: sanlock = %{version}-%{release}
@ -68,13 +64,13 @@ common sanlock lockspace.
%set_build_flags
CFLAGS=$RPM_OPT_FLAGS make -C wdmd
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
%install
make -C src 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
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
%{_libdir}/pkgconfig/libsanlock*.pc
%files -n python2-sanlock
%files -n python3-sanlock
%defattr(-,root,root,-)
%{python_sitearch}/sanlock_python-*.egg-info
%{python_sitearch}/sanlock.so
%{python3_sitearch}/sanlock_python-*.egg-info
%{python3_sitearch}/sanlock*.so
%files -n sanlk-reset
%defattr(-,root,root,-)
@ -154,6 +150,9 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%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
- update package to 3.8.1