From a40016ddb2b91fc3d1c7dec8d1d5a8b4c14c114e3220f4c3a117521f09ae96aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 7 May 2021 08:58:55 +0000 Subject: [PATCH] Accepting request 891058 from home:bnavigator:branches:devel:languages:python - Fix testsuite and devel BuildRequirements for different flavors OBS-URL: https://build.opensuse.org/request/show/891058 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-crontab?expand=0&rev=12 --- python-python-crontab.changes | 5 +++++ python-python-crontab.spec | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/python-python-crontab.changes b/python-python-crontab.changes index c9c043b..b0b1a9a 100644 --- a/python-python-crontab.changes +++ b/python-python-crontab.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 6 14:14:18 UTC 2021 - Ben Greiner + +- Fix testsuite and devel BuildRequirements for different flavors + ------------------------------------------------------------------- Mon Jan 25 10:29:59 UTC 2021 - John Vandenberg diff --git a/python-python-crontab.spec b/python-python-crontab.spec index 5cd30d2..a54692d 100644 --- a/python-python-crontab.spec +++ b/python-python-crontab.spec @@ -17,6 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without python2 Name: python-python-crontab Version: 2.5.1 Release: 0 @@ -38,11 +39,11 @@ BuildRequires: %{python_module cron-descriptor} BuildRequires: %{python_module croniter} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module testsuite if %python-base >= 3} BuildRequires: cronie +%if %{with python2} BuildRequires: python2-devel -BuildRequires: python3-testsuite -BuildRequires: (python36-testsuite if python36-base) -BuildRequires: (python38-testsuite if python38-base) +%endif # /SECTION %python_subpackages @@ -61,8 +62,12 @@ accessing the system cron automatically using an API. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# test_07_non_posix_shell - only for Windows export LANG=en_US.UTF-8 +%{python_expand mkdir -p build/bin +ln -s %{_bindir}/$python build/bin/python +} +export PATH=$PWD/build/bin:$PATH +# test_07_non_posix_shell - only for Windows %pytest -k "not test_07_non_posix_shell" %files %{python_files}