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