14
0
forked from pool/python-cachy

- Add patch support-pymemcache.patch:

* Use pymemcache rather than other clients.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cachy?expand=0&rev=7
This commit is contained in:
2022-12-19 02:09:52 +00:00
committed by Git OBS Bridge
parent 5671a11e09
commit e73bb597c3
3 changed files with 29 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 19 02:07:36 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pymemcache.patch:
* Use pymemcache rather than other clients.
-------------------------------------------------------------------
Mon Feb 21 09:35:23 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -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

19
support-pymemcache.patch Normal file
View File

@@ -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