diff --git a/python-cachy.changes b/python-cachy.changes index e61fb35..5fc87e5 100644 --- a/python-cachy.changes +++ b/python-cachy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 19 02:07:36 UTC 2022 - Steve Kowalik + +- Add patch support-pymemcache.patch: + * Use pymemcache rather than other clients. + ------------------------------------------------------------------- Mon Feb 21 09:35:23 UTC 2022 - Andreas Schneider diff --git a/python-cachy.spec b/python-cachy.spec index 6810c15..10d6361 100644 --- a/python-cachy.spec +++ b/python-cachy.spec @@ -23,21 +23,21 @@ Version: 0.3.0 Release: 0 Summary: A caching library for Python License: MIT -Group: Development/Languages/Python URL: https://github.com/sdispater/cachy Source: https://files.pythonhosted.org/packages/source/c/cachy/cachy-%{version}.tar.gz +Patch0: support-pymemcache.patch BuildRequires: %{python_module fakeredis >= 0.10.2} BuildRequires: %{python_module flexmock >= 0.10.2} BuildRequires: %{python_module msgpack-python >= 0.5} +BuildRequires: %{python_module pymemcache >= 4.0} BuildRequires: %{python_module pytest >= 3.5} BuildRequires: %{python_module pytest-mock >= 1.9} -BuildRequires: %{python_module python-memcached >= 1.59} BuildRequires: %{python_module redis >= 2.10} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Recommends: python-msgpack-python >= 0.5 -Recommends: python-python-memcached >= 1.59 +Recommends: python-pymemcache >= 4.0 Recommends: python-redis >= 2.10 BuildArch: noarch %python_subpackages @@ -46,7 +46,7 @@ BuildArch: noarch Cachy provides a caching library. %prep -%setup -q -n cachy-%{version} +%autosetup -p1 -n cachy-%{version} %build %python_build diff --git a/support-pymemcache.patch b/support-pymemcache.patch new file mode 100644 index 0000000..897edac --- /dev/null +++ b/support-pymemcache.patch @@ -0,0 +1,19 @@ +Index: cachy-0.3.0/cachy/stores/memcached_store.py +=================================================================== +--- cachy-0.3.0.orig/cachy/stores/memcached_store.py ++++ cachy-0.3.0/cachy/stores/memcached_store.py +@@ -1,12 +1,9 @@ + # -*- coding: utf-8 -*- + + try: +- from pylibmc import memcache ++ from pymemcache.client import base as memcache + except ImportError: +- try: +- import memcache +- except ImportError: +- memcache = None ++ memcache = None + + from ..contracts.taggable_store import TaggableStore +