1{ lib, fetchPypi, buildPythonPackage, fetchpatch, astroid, six, coverage
2, lazy-object-proxy, nose, wrapt, isPy38
3}:
4
5buildPythonPackage rec {
6 pname = "asttokens";
7 version = "1.1.13";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "1vd4djlxmgznz84gzakkv45avnrcpgl1kir92l1pxyp0z5c0dh2m";
12 };
13
14 patches = [
15 # Fix tests for astroid 2.2 in python 3. Remove with the next release
16 (fetchpatch {
17 url = "https://github.com/gristlabs/asttokens/commit/21caaaa74105c410b3d84c3d8ff0dc2f612aac9a.patch";
18 sha256 = "182xfr0cx4pxx0dv1l50a1c281h8ywir8vvd1zh5iicflivim1nv";
19 })
20 ];
21
22 propagatedBuildInputs = [ lazy-object-proxy six wrapt astroid ];
23
24 checkInputs = [ coverage nose ];
25
26 meta = with lib; {
27 homepage = https://github.com/gristlabs/asttokens;
28 description = "Annotate Python AST trees with source text and token information";
29 license = licenses.asl20;
30 platforms = platforms.all;
31 maintainers = with maintainers; [ leenaars ];
32 broken = isPy38;
33 };
34}