1{
2 lib,
3 astroid,
4 buildPythonPackage,
5 fetchPypi,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools-scm,
9}:
10
11buildPythonPackage rec {
12 pname = "asttokens";
13 version = "3.0.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-Dc2Lqo1isMHRGLOZst26PEr/Jx0Nep4NTBaBx5A1u8c=";
21 };
22
23 build-system = [ setuptools-scm ];
24
25 nativeCheckInputs = [
26 astroid
27 pytestCheckHook
28 ];
29
30 disabledTests = [
31 # Test is currently failing on Hydra, works locally
32 "test_slices"
33 ];
34
35 disabledTestPaths = [
36 # incompatible with astroid 2.11.0, pins <= 2.5.3
37 "tests/test_astroid.py"
38 ];
39
40 pythonImportsCheck = [ "asttokens" ];
41
42 meta = with lib; {
43 description = "Annotate Python AST trees with source text and token information";
44 homepage = "https://github.com/gristlabs/asttokens";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ leenaars ];
47 };
48}