2021-03-20 04:20:00 +00:00
|
|
|
{ lib, fetchPypi, fetchpatch, buildPythonPackage,
|
2020-05-03 17:38:23 +00:00
|
|
|
setuptools_scm, toml, six, astroid, pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asttokens";
|
2020-05-03 17:38:23 +00:00
|
|
|
version = "2.0.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-03 17:38:23 +00:00
|
|
|
sha256 = "0a2ixiz04aw4p0aivxh47k3fa9ql804l3y5iv5gcih9aizi5fbm4";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes compatibility with python 3.9, will be included in the next release
|
|
|
|
# after 2.0.4
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gristlabs/asttokens/commit/d8ff80ee7d2e64c5e1daf50cc38eb99663f1b1ac.patch";
|
|
|
|
sha256 = "19y8n8vpzr2ijldbq5rh19sf0vz5azqqpkb9bx0ljjg98h6k7kjj";
|
|
|
|
excludes = [ "setup.cfg" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
propagatedBuildInputs = [ setuptools_scm toml six astroid ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
checkInputs = [ pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/gristlabs/asttokens";
|
|
|
|
description = "Annotate Python AST trees with source text and token information";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|