diff --git a/python-shaptools.changes b/python-shaptools.changes index ab1fcb7..969d584 100644 --- a/python-shaptools.changes +++ b/python-shaptools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 13 02:13:36 UTC 2023 - Steve Kowalik + +- Correct macro usage, %ifpython2 is only suitable for Requires. + ------------------------------------------------------------------- Thu Jan 5 23:44:22 UTC 2023 - Steve Kowalik diff --git a/python-shaptools.spec b/python-shaptools.spec index 4726084..5e48b47 100644 --- a/python-shaptools.spec +++ b/python-shaptools.spec @@ -20,6 +20,12 @@ %bcond_without test %endif +%if 0%{?sle_version} <= 150300 && !0%{?is_opensuse} +%bcond_without python2 +%else +%bcond_with python2 +%endif + %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-shaptools Version: 0 @@ -32,7 +38,7 @@ Source: %{name}-%{version}.tar.gz %if %{with test} BuildRequires: %{python_module pytest} %endif -%ifpython2 +%if %{with python2} BuildRequires: python-mock %endif BuildRequires: %{python_module setuptools}