From 9ead970146e6d5f2e8f053510ba07e667fb40bfc Mon Sep 17 00:00:00 2001 From: huangtianhua Date: Tue, 8 Feb 2022 07:07:18 +0000 Subject: [PATCH] Remove python2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 因为OpenStack-Train_openEuler-22.03-LTS-Next分支从20.03-LTS-SP3拉取的, 而22.03-LTS不再支持python2, 该软件包spec中涉及python2打包相关都需要删除。 --- python-cryptography.spec | 49 ++++------------------------------------ 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/python-cryptography.spec b/python-cryptography.spec index 625984e..34119b9 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,9 +1,7 @@ -%bcond_with python2 -%bcond_without python3 %global srcname cryptography Name: python-%{srcname} Version: 3.3.1 -Release: 1 +Release: 2 Summary: PyCA's cryptography library License: ASL 2.0 or BSD URL: https://cryptography.io/en/latest/ @@ -14,13 +12,6 @@ Patch6000: backport-CVE-2020-36242.patch BuildRequires: openssl-devel BuildRequires: gcc -%if %{with python2} -BuildRequires: python2-devel python2-pytest >= 3.2.1 python2-setuptools -BuildRequires: python2-pretend python2-iso8601 python2-cryptography-vectors = %{version} -BuildRequires: python2-asn1crypto >= 0.21 python2-hypothesis >= 1.11.4 python2-pytz -BuildRequires: python2-idna >= 2.1 python2-six >= 1.4.1 python2-cffi >= 1.7 -BuildRequires: python2-enum34 python2-ipaddress -%endif BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest >= 3.2.1 @@ -39,20 +30,6 @@ BuildRequires: python%{python3_pkgversion}-cffi >= 1.7 cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. -%if %{with python2} -%package -n python2-cryptography -Summary: PyCA's cryptography library - -Requires: openssl-libs python2-idna >= 2.1 python2-asn1crypto >= 0.21 -Requires: python2-six >= 1.4.1 python2-cffi >= 1.7 python2-enum34 -Requires: python2-ipaddress - -%{?python_provide:%python_provide python2-cryptography} - -%description -n python2-cryptography -cryptography is a package designed to expose cryptographic primitives and -recipes to Python developers. -%endif %package -n python%{python3_pkgversion}-cryptography Summary: PyCA's cryptography library @@ -75,10 +52,6 @@ recipes to Python developers. %autosetup -n cryptography-%{version} -p1 %build -%if %{with python2} -%py2_build -%endif - %py3_build %install @@ -86,28 +59,11 @@ recipes to Python developers. # see https://github.com/pyca/cryptography/issues/1463 find . -name .keep -print -delete -%if %{with python2} -%py2_install -%endif - %py3_install %check -%if %{with python2} -PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)" -%endif - PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_buffer_protocol_alternate_modes or test_dh_parameters_supported or test_load_ecdsa_no_named_curve)" -%if %{with python2} -%files -n python2-cryptography -%defattr(-,root,root) -%doc AUTHORS.rst -%license LICENSE LICENSE.APACHE LICENSE.BSD -%{python2_sitearch}/cryptography -%{python2_sitearch}/cryptography-%{version}-py*.egg-info -%endif - %files -n python%{python3_pkgversion}-cryptography %defattr(-,root,root) %doc AUTHORS.rst @@ -119,6 +75,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not (test_ %doc README.rst docs %changelog +* Tue Feb 08 2022 huangtianhua -3.3.1-2 +- Remove python2 + * Thu Aug 12 2021 liyanan - 3.3.1-1 - update to 3.3.1 -- Gitee