nixpkgs/pkgs/development/python-modules/asteval/default.nix
2022-01-19 11:09:06 +00:00

39 lines
776 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "asteval";
version = "0.9.26";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "newville";
repo = pname;
rev = version;
sha256 = "0l2iv51yclqn52w3yvyz3brpbca076ivv70h4gd6bkhwjbax1i2b";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "asteval" ];
meta = with lib; {
description = "AST evaluator of Python expression using ast module";
homepage = "https://github.com/newville/asteval";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}