at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch, 6 pytestCheckHook, 7 pythonOlder, 8}: 9 10buildPythonPackage rec { 11 pname = "namedlist"; 12 version = "1.8"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-NPifyZJZLICzmnCeE27c9B6hfyS6Mer4SjFKAsi5vO8="; 20 }; 21 22 nativeCheckInputs = [ pytestCheckHook ]; 23 24 patches = [ 25 # Deprecation warning using collections.abc, https://gitlab.com/ericvsmith/namedlist/-/merge_requests/1 26 (fetchpatch { 27 url = "https://gitlab.com/ericvsmith/namedlist/-/commit/102d15b455e6f058b9c95fe135167be82b34c14a.patch"; 28 hash = "sha256-IfDgiObFFSOUnAlXR/+ye8uutGaFJ/AyQvCb76iNaMM="; 29 }) 30 ]; 31 32 # Test file has a `unittest.main()` at the bottom that fails the tests; 33 # py.test can run the tests without it. 34 postPatch = '' 35 substituteInPlace test/test_namedlist.py --replace "unittest.main()" "" 36 ''; 37 38 pythonImportsCheck = [ "namedlist" ]; 39 40 disabledTests = [ 41 # AttributeError: module 'collections' has no attribute 'Container' 42 "test_ABC" 43 ]; 44 45 meta = with lib; { 46 description = "Similar to namedtuple, but instances are mutable"; 47 homepage = "https://gitlab.com/ericvsmith/namedlist"; 48 license = licenses.asl20; 49 maintainers = with maintainers; [ ivan ]; 50 }; 51}