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