Files
nixpkgs/pkgs/development/python-modules/namedlist/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

49 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
fetchpatch,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "namedlist";
version = "1.8";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-NPifyZJZLICzmnCeE27c9B6hfyS6Mer4SjFKAsi5vO8=";
};
nativeCheckInputs = [ pytestCheckHook ];
patches = [
# Deprecation warning using collections.abc, https://gitlab.com/ericvsmith/namedlist/-/merge_requests/1
(fetchpatch {
url = "https://gitlab.com/ericvsmith/namedlist/-/commit/102d15b455e6f058b9c95fe135167be82b34c14a.patch";
hash = "sha256-IfDgiObFFSOUnAlXR/+ye8uutGaFJ/AyQvCb76iNaMM=";
})
];
# Test file has a `unittest.main()` at the bottom that fails the tests;
# py.test can run the tests without it.
postPatch = ''
substituteInPlace test/test_namedlist.py --replace "unittest.main()" ""
'';
pythonImportsCheck = [ "namedlist" ];
disabledTests = [
# AttributeError: module 'collections' has no attribute 'Container'
"test_ABC"
];
meta = {
description = "Similar to namedtuple, but instances are mutable";
homepage = "https://gitlab.com/ericvsmith/namedlist";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ivan ];
};
}