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