diff --git a/python-pylibmc.changes b/python-pylibmc.changes index f11c90e..859f6fd 100644 --- a/python-pylibmc.changes +++ b/python-pylibmc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 18 14:59:02 UTC 2022 - Dominique Leuenberger + +- Cope with memcached moving from sbindir to bindir and safeguard + against non-existing memcached binary: it if can't be started, + there is no reason to even attempt to run the test suite. + ------------------------------------------------------------------- Fri Dec 10 03:36:04 UTC 2021 - Steve Kowalik diff --git a/python-pylibmc.spec b/python-pylibmc.spec index 2e2fdbd..c466589 100644 --- a/python-pylibmc.spec +++ b/python-pylibmc.spec @@ -1,7 +1,7 @@ # # spec file for package python-pylibmc # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -58,7 +58,14 @@ export CFLAGS="%{optflags}" %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -%{_sbindir}/memcached & +if [ -f %{_sbindir}/memcached ]; then + %{_sbindir}/memcached & +elif [ -f %{_bindir}/memcached ]; then + %{_bindir}/memcached & +else + echo "Failed to start memcached - tests can't pass" + exit 1 +fi pid=$! %pytest_arch -k 'not testBigGetMulti' kill $pid