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