1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest-cov-stub,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools-scm,
9}:
10
11buildPythonPackage rec {
12 pname = "asteval";
13 version = "1.0.6";
14 pyproject = true;
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "lmfit";
20 repo = "asteval";
21 tag = version;
22 hash = "sha256-DzLVe8TlWAPQXzai9CJlDAow6UTSmkA/DW3fT30YfZY=";
23 };
24
25 build-system = [ setuptools-scm ];
26
27 nativeCheckInputs = [
28 pytest-cov-stub
29 pytestCheckHook
30 ];
31
32 pythonImportsCheck = [ "asteval" ];
33
34 disabledTests = [
35 # AssertionError: 'ImportError' != None
36 "test_set_default_nodehandler"
37 ];
38
39 meta = with lib; {
40 description = "AST evaluator of Python expression using ast module";
41 homepage = "https://github.com/lmfit/asteval";
42 changelog = "https://github.com/lmfit/asteval/releases/tag/${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ fab ];
45 };
46}