depot/third_party/nixpkgs/pkgs/development/python-modules/asteval/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

47 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "asteval";
version = "0.9.33";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "lmfit";
repo = "asteval";
rev = "refs/tags/${version}";
hash = "sha256-j07HH84cn2AA5DyMcM7sXiBubCjZP67RJXVcErMPyBk=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail " --cov=asteval --cov-report xml" ""
'';
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 ];
};
}