!9 Remove python2

From: @wangchen2020
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2020-10-30 10:11:35 +08:00 committed by Gitee
commit 32c05adeb6

View File

@ -3,7 +3,7 @@
Summary: Libcap-ng is a library used for posix capabilities programming Summary: Libcap-ng is a library used for posix capabilities programming
Name: libcap-ng Name: libcap-ng
Version: 0.7.10 Version: 0.7.10
Release: 2 Release: 3
License: LGPLv2+ and GPLv2+ License: LGPLv2+ and GPLv2+
URL: http://people.redhat.com/sgrubb/libcap-ng URL: http://people.redhat.com/sgrubb/libcap-ng
Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
@ -29,20 +29,6 @@ Requires: pkgconfig
The %{name}-devel package contains the files needed for developing The %{name}-devel package contains the files needed for developing
applications that need to use the %{name} library. applications that need to use the %{name} library.
%package -n python2-libcap-ng
%{?python_provide:%python_provide python2-libcap-ng}
Summary: Python2 bindings for libcap-ng library
License: LGPLv2+
BuildRequires: python2-devel swig
Requires: %{name} = %{version}-%{release}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
%description -n python2-libcap-ng
The python2-%{name} package contains the bindings so that %{name} and
can be used by python2 applications.
%package python3 %package python3
Summary: Python3 bindings for libcap-ng library Summary: Python3 bindings for libcap-ng library
License: LGPLv2+ License: LGPLv2+
@ -59,7 +45,7 @@ can be used by python3 applications.
%autosetup -p1 %autosetup -p1
%build %build
%configure --libdir=/%{_lib} --with-python --with-python3 %configure --libdir=/%{_lib} --with-python=no --with-python3
make CFLAGS="%{optflags}" %{?_smp_mflags} make CFLAGS="%{optflags}" %{?_smp_mflags}
%install %install
@ -94,10 +80,6 @@ make check
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4 %attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
%{_libdir}/pkgconfig/libcap-ng.pc %{_libdir}/pkgconfig/libcap-ng.pc
%files -n python2-libcap-ng
%attr(755,root,root) %{python2_sitearch}/_capng.so
%{python2_sitearch}/capng.py*
%files python3 %files python3
%attr(755,root,root) %{python3_sitearch}/* %attr(755,root,root) %{python3_sitearch}/*
%{python3_sitearch}/capng.py* %{python3_sitearch}/capng.py*
@ -107,6 +89,12 @@ make check
%attr(0644,root,root) %{_mandir}/man8/* %attr(0644,root,root) %{_mandir}/man8/*
%changelog %changelog
* Thu Oct 29 2020 wangchen<wangchen137@huawei.com> - 0.7.10-3
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:remove python2
* Wed Sep 9 2020 wangchen<wangchen137@huawei.com> - 0.7.10-2 * Wed Sep 9 2020 wangchen<wangchen137@huawei.com> - 0.7.10-2
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA