1{ lib 2, buildPythonPackage 3, fetchPypi 4, coverage 5, pythonOlder 6, nose 7, pytestCheckHook 8, six 9}: 10 11buildPythonPackage rec { 12 pname = "attrdict"; 13 version = "2.0.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-NckGmLVcaDlGCRF3F3qenAcToIYPDgSf69cmSczXe3A="; 21 }; 22 23 propagatedBuildInputs = [ 24 six 25 ]; 26 27 checkInputs = [ 28 coverage 29 nose 30 ]; 31 32 postPatch = '' 33 substituteInPlace attrdict/merge.py \ 34 --replace "from collections" "from collections.abc" 35 substituteInPlace attrdict/mapping.py \ 36 --replace "from collections" "from collections.abc" 37 substituteInPlace attrdict/default.py \ 38 --replace "from collections" "from collections.abc" 39 substituteInPlace attrdict/mixins.py \ 40 --replace "from collections" "from collections.abc" 41 ''; 42 43 # Tests are not shipped and source is not tagged 44 doCheck = false; 45 46 pythonImportsCheck = [ 47 "attrdict" 48 ]; 49 50 meta = with lib; { 51 description = "A dict with attribute-style access"; 52 homepage = "https://github.com/bcj/AttrDict"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ ]; 55 }; 56}