f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools-scm,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "asteval";
|
|
version = "1.0.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lmfit";
|
|
repo = "asteval";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-Ee7EAcSfLmo9ijm4oa3nEVPoz1pgLx4ozbSXBW3kRPw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "--cov=asteval --cov-report html" ""
|
|
'';
|
|
|
|
build-system = [ setuptools-scm ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "asteval" ];
|
|
|
|
disabledTests = [
|
|
# AssertionError: 'ImportError' != None
|
|
"test_set_default_nodehandler"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "AST evaluator of Python expression using ast module";
|
|
homepage = "https://github.com/lmfit/asteval";
|
|
changelog = "https://github.com/lmfit/asteval/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|