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