!5 libpwquality移除python2

From: @hugel
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2020-10-30 14:35:46 +08:00 committed by Gitee
commit 057b0f0b91

View File

@ -3,7 +3,7 @@
Name: libpwquality
Version: 1.4.2
Release: 1
Release: 2
Summary: Library for password quality checking and generating random passwords.
License: BSD or GPLv2+
URL: https://github.com/libpwquality/libpwquality/
@ -13,7 +13,7 @@ Patch0: modify-pwquality_conf.patch
Patch1: fix-password-similarity.patch
BuildRequires: gcc cracklib-devel gettext pam-devel
BuildRequires: python2-devel python3-devel
BuildRequires: python3-devel
Recommends: cracklib >= 2.8
Requires: pam
@ -32,13 +32,6 @@ Requires: pkgconfig
Files needed for development of applications using the libpwquality library.
See the pwquality.h header file for the API.
%package -n python2-pwquality
Summary: Python2 bindings for the libpwquality library
Requires: libpwquality = %{version}-%{release}
%description -n python2-pwquality
This package provides Python2 bindings for the libpwquality library.
%package -n python3-pwquality
Summary: Python3 bindings for the libpwquality library
Requires: libpwquality = %{version}-%{release}
@ -51,35 +44,18 @@ This package provides Python3 bindings for the libpwquality library.
%prep
%autosetup -n %{name}-%{version} -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
#python2
%configure --with-securedir=%{_moduledir} \
--with-pythonsitedir=%{python2_sitearch} \
--with-python-binary=%{__python2} \
--disable-static
%make_build
#python3
cd %{py3dir}
%configure --with-securedir=%{_moduledir} \
--with-pythonsitedir=%{python3_sitearch} \
--with-python-binary=%{__python3} \
--disable-static
%make_build
cd -
%install
%make_install
cd %{py3dir}
%make_install -C python
cd -
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_moduledir}/*.la
@ -91,8 +67,6 @@ mkdir %{buildroot}%{_secconfdir}/pwquality.conf.d
%ldconfig_scriptlets
%files -f libpwquality.lang
%license COPYING
%doc README NEWS AUTHORS
@ -108,10 +82,6 @@ mkdir %{buildroot}%{_secconfdir}/pwquality.conf.d
%{_libdir}/libpwquality.so
%{_libdir}/pkgconfig/*.pc
%files -n python2-pwquality
%{python2_sitearch}/pwquality.so
%{python2_sitearch}/*.egg-info
%files -n python3-pwquality
%{python3_sitearch}/*.so
%{python3_sitearch}/*.egg-info
@ -123,6 +93,12 @@ mkdir %{buildroot}%{_secconfdir}/pwquality.conf.d
%{_mandir}/man8/*
%changelog
* Thu Oct 29 2020 Hugel <gengqihu1@huawei.com> - 1.4.2-2
- Type:requirement
- ID:NA
- SUG:NA
- DESC:delete python2 package
* Thu Jul 23 2020 Hugel <gengqihu1@huawei.com> - 1.4.2-1
- Type:enhancement
- ID:NA