diff --git a/python-tempora.changes b/python-tempora.changes index e516a05..08dc6b8 100644 --- a/python-tempora.changes +++ b/python-tempora.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 11 12:25:33 UTC 2018 - tchvatal@suse.com + +- Fix building with python3 only available + ------------------------------------------------------------------- Fri Mar 31 13:43:53 UTC 2017 - jmatejek@suse.com diff --git a/python-tempora.spec b/python-tempora.spec index 905db9f..a6107c7 100644 --- a/python-tempora.spec +++ b/python-tempora.spec @@ -1,7 +1,7 @@ # # spec file for package python-tempora # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-tempora Version: 1.6.1 Release: 0 @@ -33,11 +34,12 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python2-backports.unittest_mock Requires: python-pytz Requires: python-six -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%if %{with python2} +BuildRequires: python2-backports.unittest_mock +%endif %python_subpackages %description @@ -62,7 +64,6 @@ Modules include: %python_exec -m pytest tests %files %{python_files} -%defattr(-,root,root,-) %doc CHANGES.rst README.rst docs/*rst %python3_only %{_bindir}/calc-prorate %{python_sitelib}/*