nixpkgs/pkgs/development/python-modules/lime/default.nix
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

62 lines
1.2 KiB
Nix

{
lib,
fetchPypi,
buildPythonPackage,
matplotlib,
numpy,
scipy,
tqdm,
scikit-learn,
scikit-image,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "lime";
version = "0.2.0.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-dpYOTwVf61Pom1AiODuvyHtj8lusYmWYSwozPRpX94E=";
};
postPatch = ''
substituteInPlace lime/tests/test_scikit_image.py \
--replace-fail "random_seed" "rng"
'';
propagatedBuildInputs = [
matplotlib
numpy
scipy
tqdm
scikit-learn
scikit-image
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [
# touches network
"lime/tests/test_lime_text.py"
];
pythonImportsCheck = [
"lime.exceptions"
"lime.explanation"
"lime.lime_base"
"lime.lime_image"
"lime.lime_text"
];
meta = {
description = "Local Interpretable Model-Agnostic Explanations for machine learning classifiers";
homepage = "https://github.com/marcotcr/lime";
changelog = "https://github.com/marcotcr/lime/releases/tag/${version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ khaser ];
};
}