1{
2 lib,
3 buildPythonPackage,
4 faker,
5 fetchFromGitHub,
6 mock,
7 pytest-cov-stub,
8 pytestCheckHook,
9 python-memcached,
10 pythonOlder,
11 setuptools,
12 zstd,
13 stdenv,
14}:
15
16buildPythonPackage rec {
17 pname = "pymemcache";
18 version = "4.0.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "pinterest";
25 repo = "pymemcache";
26 rev = "v${version}";
27 hash = "sha256-WgtHhp7lE6StoOBfSy9+v3ODe/+zUC7lGrc2S4M68+M=";
28 };
29
30 build-system = [ setuptools ];
31
32 nativeCheckInputs = [
33 faker
34 mock
35 pytest-cov-stub
36 pytestCheckHook
37 python-memcached
38 zstd
39 ];
40
41 disabledTests = lib.optionals stdenv.hostPlatform.is32bit [
42 # test_compressed_complex is broken on 32-bit platforms
43 # this can be removed on the next version bump
44 # see also https://github.com/pinterest/pymemcache/pull/480
45 "test_compressed_complex"
46 ];
47
48 pythonImportsCheck = [ "pymemcache" ];
49
50 meta = with lib; {
51 changelog = "https://github.com/pinterest/pymemcache/blob/${src.rev}/ChangeLog.rst";
52 description = "Python memcached client";
53 homepage = "https://pymemcache.readthedocs.io/";
54 license = with licenses; [ asl20 ];
55 maintainers = with maintainers; [ fab ];
56 };
57}