From 2ea74614d2103b14bf78205e0934bb4fad06d35cd1f6adb01a1272a6548bea55 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 9 Dec 2021 05:56:40 +0000 Subject: [PATCH] - Inject multibuild to avoid a build loop. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyOpenSSL?expand=0&rev=85 --- _multibuild | 3 +++ python-pyOpenSSL.changes | 5 +++++ python-pyOpenSSL.spec | 33 +++++++++++++++++++++++++-------- 3 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-pyOpenSSL.changes b/python-pyOpenSSL.changes index c68bc8b..b0ffed9 100644 --- a/python-pyOpenSSL.changes +++ b/python-pyOpenSSL.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 9 05:55:51 UTC 2021 - Steve Kowalik + +- Inject multibuild to avoid a build loop. + ------------------------------------------------------------------- Sat Oct 30 19:08:35 UTC 2021 - Matej Cepl diff --git a/python-pyOpenSSL.spec b/python-pyOpenSSL.spec index ea18da2..44e31ed 100644 --- a/python-pyOpenSSL.spec +++ b/python-pyOpenSSL.spec @@ -1,5 +1,5 @@ # -# spec file for package python-pyOpenSSL +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -18,7 +18,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python -Name: python-pyOpenSSL +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-pyOpenSSL%{psuffix} Version: 21.0.0 Release: 0 Summary: Python wrapper module around the OpenSSL library @@ -32,16 +40,19 @@ Patch0: skip-networked-test.patch # Check for invalid ALPN lists before calling OpenSSL Patch1: check_inv_ALPN_lists.patch BuildRequires: %{python_module cffi} -BuildRequires: %{python_module cryptography >= 3.3} -BuildRequires: %{python_module flaky} -BuildRequires: %{python_module pretend} -BuildRequires: %{python_module pytest >= 3.0.1} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} -BuildRequires: ca-certificates-mozilla BuildRequires: fdupes BuildRequires: openssl BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module cryptography >= 3.3} +BuildRequires: %{python_module flaky} +BuildRequires: %{python_module pretend} +BuildRequires: %{python_module pyOpenSSL} +BuildRequires: %{python_module pytest >= 3.0.1} +BuildRequires: %{python_module six} +BuildRequires: ca-certificates-mozilla +%endif Requires: python-cffi Requires: python-cryptography >= 3.3 Requires: python-six >= 1.5.2 @@ -70,21 +81,27 @@ other things) a cffi-based interface to OpenSSL. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} SKIPPED_TESTS="network" %if %{__isa_bits} == 32 SKIPPED_TESTS="(network or test_verify_with_time)" %endif export LC_ALL=en_US.UTF-8 %pytest -k "not $SKIPPED_TESTS" +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc *.rst %{python_sitelib}/OpenSSL/ %{python_sitelib}/pyOpenSSL-%{version}-py*.egg-info +%endif %changelog