From 927d53e2bda2ad7def5533174e5cb55ee4ff853f92a07698ae708342363f07f5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 8 Jul 2021 17:35:28 +0000 Subject: [PATCH] - Add %pyunittest shim for platforms where it is missing. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=99 --- python-pytz.changes | 5 +++++ python-pytz.spec | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/python-pytz.changes b/python-pytz.changes index f0215e1..1661e53 100644 --- a/python-pytz.changes +++ b/python-pytz.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 8 17:16:15 UTC 2021 - Matej Cepl + +- Add %pyunittest shim for platforms where it is missing. + ------------------------------------------------------------------- Thu Jun 24 21:46:08 UTC 2021 - Matej Cepl diff --git a/python-pytz.spec b/python-pytz.spec index f800269..d2cfdc1 100644 --- a/python-pytz.spec +++ b/python-pytz.spec @@ -21,6 +21,13 @@ %define tzdata_version 2021a %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!pyunittest:%define pyunittest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \\\ + %{lua: local args = rpm.expand("%**"); + local broot = rpm.expand("%buildroot"); + local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 $python -m unittest "; + print(rpm.expand(intro .. args .. "}")) + } } + Name: python-pytz Version: 2021.1 Release: 0