Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 50 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pytestCheckHook, 6 pythonOlder, 7 setuptools, 8 six, 9}: 10 11buildPythonPackage rec { 12 pname = "attrdict"; 13 version = "2.0.1"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-NckGmLVcaDlGCRF3F3qenAcToIYPDgSf69cmSczXe3A="; 21 }; 22 23 postPatch = '' 24 substituteInPlace attrdict/merge.py \ 25 --replace-fail "from collections" "from collections.abc" 26 substituteInPlace attrdict/mapping.py \ 27 --replace-fail "from collections" "from collections.abc" 28 substituteInPlace attrdict/default.py \ 29 --replace-fail "from collections" "from collections.abc" 30 substituteInPlace attrdict/mixins.py \ 31 --replace-fail "from collections" "from collections.abc" 32 ''; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ six ]; 37 38 # Tests are not shipped and source is not tagged 39 doCheck = false; 40 41 pythonImportsCheck = [ "attrdict" ]; 42 43 meta = with lib; { 44 description = "A dict with attribute-style access"; 45 homepage = "https://github.com/bcj/AttrDict"; 46 changelog = "https://github.com/bcj/AttrDict/releases/tag/v${version}"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ ]; 49 }; 50}