From 595ff52cb28d258951c97944d107da071758d7c5da549dce45d097f903c5b18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 11 Oct 2024 10:07:32 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-diskcache revision 71711856605fd6c55f694227cbd9da68 --- python-diskcache.changes | 6 ++++++ python-diskcache.spec | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/python-diskcache.changes b/python-diskcache.changes index a188876..eedbafd 100644 --- a/python-diskcache.changes +++ b/python-diskcache.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 1 10:19:39 UTC 2024 - Daniel Garcia + +- Make Django build-requirement conditional and disable by default for + SUSE:SLFO:Main, bsc#1231124 + ------------------------------------------------------------------- Wed Sep 27 12:15:19 UTC 2023 - ecsos diff --git a/python-diskcache.spec b/python-diskcache.spec index 36e9ec8..f2a88da 100644 --- a/python-diskcache.spec +++ b/python-diskcache.spec @@ -1,7 +1,7 @@ # # spec file for package python-diskcache # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,13 @@ # +%if 0%{?suse_version} == 1600 +# No django in SLFO:Main +%bcond_with django +%else +%bcond_without django +%endif + %{?sle15_python_module_pythons} Name: python-diskcache Version: 5.6.3 @@ -30,8 +37,10 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with django} BuildRequires: %{python_module Django if (%python-base without python36-base)} BuildRequires: %{python_module pytest-django if (%python-base without python36-base)} +%endif Requires: python BuildArch: noarch %python_subpackages @@ -54,11 +63,15 @@ sed -i '/--cov/d' tox.ini %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +%if %{without django} +python_flags=("--ignore" "tests/test_doctest.py" "-k" "not README.rst") +%else # No python36-Django 4 on TW python36_flags=("--ignore" "tests/test_doctest.py" "-k" "not README.rst") +%endif # Broken since Django 3.2 -- https://github.com/grantjenks/python-diskcache/issues/210 donttest_djangocache="--ignore tests/test_djangocache.py" -%pytest "${$python_flags[@]}" ${donttest_djangocache} +%pytest "${$python_flags[@]}" "${python_flags[@]}" ${donttest_djangocache} %files %{python_files} %license LICENSE