From c6106f6e0bd61bdafaef50958e00ec342bac89ade8cf4cac87e8878275eab8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 5 Apr 2019 07:16:38 +0000 Subject: [PATCH] - Run tests only under py3 as CherryPy is available only there OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CacheControl?expand=0&rev=9 --- python-CacheControl.changes | 5 +++++ python-CacheControl.spec | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/python-CacheControl.changes b/python-CacheControl.changes index 7f50d14..924b2ff 100644 --- a/python-CacheControl.changes +++ b/python-CacheControl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 5 07:14:44 UTC 2019 - Tomáš Chvátal + +- Run tests only under py3 as CherryPy is available only there + ------------------------------------------------------------------- Mon Mar 25 09:46:31 UTC 2019 - John Vandenberg diff --git a/python-CacheControl.spec b/python-CacheControl.spec index cab624d..2df6546 100644 --- a/python-CacheControl.spec +++ b/python-CacheControl.spec @@ -34,13 +34,14 @@ Recommends: python-lockfile >= 0.9 Suggests: python-redis >= 2.10.5 BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module CherryPy} -BuildRequires: %{python_module lockfile >= 0.9} -BuildRequires: %{python_module mock} -BuildRequires: %{python_module msgpack} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module redis >= 2.10.5} -BuildRequires: %{python_module requests} +## cherrypy is python3 only from 18.x series +BuildRequires: python3-CherryPy +BuildRequires: python3-lockfile >= 0.9 +BuildRequires: python3-mock +BuildRequires: python3-msgpack +BuildRequires: python3-pytest +BuildRequires: python3-redis >= 2.10.5 +BuildRequires: python3-requests # /SECTION %python_subpackages @@ -60,7 +61,7 @@ requests session object. %check # These two failures are possibly bugs needing investigation -%python_exec -m pytest -k 'not test_file_cache_recognizes_consumed_file_handle and not test_etags_get_example' +PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_bin_suffix} -v -k 'not test_file_cache_recognizes_consumed_file_handle and not test_etags_get_example' %files %{python_files} %license LICENSE.txt