From 62408d85baf2e8c47108721616ed9e3824693a540ca6d67a61533cbd9f6bdc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 12 Mar 2020 07:55:19 +0000 Subject: [PATCH] - Fix build without python2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-trustme?expand=0&rev=12 --- python-trustme.changes | 5 +++++ python-trustme.spec | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/python-trustme.changes b/python-trustme.changes index b4e1272..c68b391 100644 --- a/python-trustme.changes +++ b/python-trustme.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 12 07:55:07 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + ------------------------------------------------------------------- Fri Feb 7 15:33:14 UTC 2020 - Marketa Calabkova diff --git a/python-trustme.spec b/python-trustme.spec index 5915325..a7de663 100644 --- a/python-trustme.spec +++ b/python-trustme.spec @@ -17,12 +17,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-trustme Version: 0.6.0 Release: 0 Summary: Fake CA provider for Python tests License: MIT OR Apache-2.0 -Group: Development/Languages/Python URL: https://github.com/python-trio/trustme Source: https://files.pythonhosted.org/packages/source/t/trustme/trustme-%{version}.tar.gz BuildRequires: %{python_module cryptography} @@ -32,15 +32,17 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module service_identity} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-futures -BuildRequires: python-ipaddress -%ifpython2 -Requires: python-ipaddress -%endif BuildRequires: python-rpm-macros Requires: python-cryptography Requires: python-idna BuildArch: noarch +%if %{with python2} +BuildRequires: python-futures +BuildRequires: python-ipaddress +%endif +%ifpython2 +Requires: python-ipaddress +%endif %python_subpackages %description @@ -61,7 +63,7 @@ circle of the CA is limited to the test environment. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec -m pytest +%pytest %files %{python_files} %license LICENSE