From 2874dafc0e20013c9fcf69dbaadf316d79b13a1d Mon Sep 17 00:00:00 2001 From: yang_zhuang_zhuang <1162011203@qq.com> Date: Thu, 22 Oct 2020 16:05:48 +0800 Subject: [PATCH] remove python2 --- cracklib.spec | 50 ++++---------------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/cracklib.spec b/cracklib.spec index bccaa18..d537a21 100644 --- a/cracklib.spec +++ b/cracklib.spec @@ -1,4 +1,3 @@ -%bcond_without python2 %bcond_without python3 %define dictdir %{_datadir}/cracklib @@ -6,7 +5,7 @@ Name: cracklib Version: 2.9.7 -Release: 4 +Release: 5 Summary: A password-checking library License: LGPLv2+ @@ -16,9 +15,6 @@ Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/crac Patch9000: fix-problem-of-error-message-about-simplistic-passwo.patch BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel -%if %{with python2} -BuildRequires: python2-devel -%endif %if %{with python3} BuildRequires: python3-devel %endif @@ -50,16 +46,6 @@ for compiling applications which use cracklib. %package_help -%if %{with python2} -%package -n python2-cracklib -Summary: Python 2 bindings for applications which use cracklib -Requires: %{name} = %{version}-%{release} - -%description -n python2-cracklib -The python2-cracklib package contains a module which permits applications -written in the Python 2 programming language to use cracklib. -%endif - %if %{with python3} %package -n python3-cracklib Summary: Python 3 bindings for applications which use cracklib @@ -80,26 +66,8 @@ do done chmod +x util/cracklib-format -%if %{with python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%if %{with python2} -sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in -export PYTHON=%{__python2} -%configure \ - --disable-static \ - --with-pic \ - --with-python \ - --with-default-dict=%{dictpath} -make -C po update-gmo -make -%endif - %if %{with python3} -pushd %{py3dir} sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in py3include=`python3-config --includes | awk -F' ' '{print $1;}'` export PYTHON=%{__python3} @@ -114,19 +82,12 @@ py_version="%{python3_version}$abiflags" --with-default-dict=%{dictpath} make -C po update-gmo make -popd %endif %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -%if %{with python2} -make install DESTDIR=$RPM_BUILD_ROOT 'pythondir=${pyexecdir}' -%endif - %if %{with python3} -pushd %{py3dir} make install DESTDIR=$RPM_BUILD_ROOT 'pythondir=${pyexecdir}' -popd %endif ./util/cracklib-format cracklib-dicts/* | \ @@ -181,12 +142,6 @@ make test %files help %doc README README-WORDS NEWS -%if %{with python2} -%files -n python2-cracklib -%{_libdir}/python2*/site-packages/_cracklib*.so -%{_libdir}/python2*/site-packages/*.py* -%endif - %if %{with python3} %files -n python3-cracklib %{_libdir}/python3*/site-packages/_cracklib*.so @@ -195,6 +150,9 @@ make test %endif %changelog +* Thu Oct 22 2020 yangzhuangzhuang - 2.9.7-5 +- remove python2 + * Mon Sep 14 2020 wangchen - 2.9.7-4 - Modify the URL of Source -- Gitee