1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 setuptools-scm,
6 six,
7 astroid,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "asttokens";
13 version = "2.4.1";
14 format = "pyproject";
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-sDhpcYuppusCfhNL/fafOKI21oHIPBYNUQdorxElS6A=";
19 };
20
21 nativeBuildInputs = [ setuptools-scm ];
22
23 propagatedBuildInputs = [ six ];
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 homepage = "https://github.com/gristlabs/asttokens";
44 description = "Annotate Python AST trees with source text and token information";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ leenaars ];
47 };
48}