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