From 16edebe9b700ffb3a44be7c86f298da079508316 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 13 Oct 2019 14:26:19 +0200 Subject: [PATCH] Skip unit tests that fail with OpenSSL 1.1.1.d Fix and simplify Python 3 packaging Resolves: rhbz#1761194 --- python-cryptography.spec | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/python-cryptography.spec b/python-cryptography.spec index 876dbb6..d42fb4b 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -18,7 +18,7 @@ Name: python-%{srcname} Version: 2.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: PyCA's cryptography library License: ASL 2.0 or BSD @@ -108,20 +108,12 @@ recipes to Python developers. %prep %autosetup -p1 -n %{srcname}-%{version} -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|' -%endif - %build %if 0%{?with_python2} %py2_build %endif %if 0%{?with_python3} -pushd %{py3dir} %py3_build -popd %endif %install @@ -133,20 +125,18 @@ find . -name .keep -print -delete %py2_install %endif %if 0%{?with_python3} -pushd %{py3dir} %py3_install %endif %check %if 0%{?with_python2} -# see https://github.com/pyca/cryptography/issues/4885 for the deselected test -PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest -k "not test_buffer_protocol_alternate_modes[mode5]" +# see https://github.com/pyca/cryptography/issues/4885 and +# see https://bugzilla.redhat.com/show_bug.cgi?id=1761194 for deselected tests +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 %if 0%{?with_python3} -pushd %{py3dir} -PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "not test_buffer_protocol_alternate_modes[mode5]" -popd +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)" %endif @@ -162,12 +152,17 @@ popd %files -n python%{python3_pkgversion}-%{srcname} %doc README.rst docs %license LICENSE LICENSE.APACHE LICENSE.BSD -%{python3_sitearch}/* +%{python3_sitearch}/%{srcname} %{python3_sitearch}/%{srcname}-%{version}-py*.egg-info %endif %changelog +* Sun Oct 13 2019 Christian Heimes - 2.7-3 +- Skip unit tests that fail with OpenSSL 1.1.1.d +- Resolves: rhbz#1761194 +- Fix and simplify Python 3 packaging + * Sat Oct 12 2019 Christian Heimes - 2.7-2 - Drop Python 2 package - Resolves: rhbz#1761081