Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, isPyPy
6, lazy-object-proxy
7, setuptools
8, typing-extensions
9, typed-ast
10, pylint
11, pytestCheckHook
12, wrapt
13}:
14
15buildPythonPackage rec {
16 pname = "astroid";
17 version = "2.12.12"; # Check whether the version is compatible with pylint
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7.2";
21
22 src = fetchFromGitHub {
23 owner = "PyCQA";
24 repo = pname;
25 rev = "v${version}";
26 hash = "sha256-FN/bBAxx9p1iAB3WXIZyyKv/zse7xtXzslclADMbouA=";
27 };
28
29 nativeBuildInputs = [
30 setuptools
31 ];
32
33 propagatedBuildInputs = [
34 lazy-object-proxy
35 wrapt
36 ] ++ lib.optionals (pythonOlder "3.10") [
37 typing-extensions
38 ] ++ lib.optionals (!isPyPy && pythonOlder "3.8") [
39 typed-ast
40 ];
41
42 checkInputs = [
43 pytestCheckHook
44 typing-extensions
45 ];
46
47 passthru.tests = {
48 inherit pylint;
49 };
50
51 meta = with lib; {
52 description = "An abstract syntax tree for Python with inference support";
53 homepage = "https://github.com/PyCQA/astroid";
54 license = licenses.lgpl21Plus;
55 maintainers = with maintainers; [ SuperSandro2000 ];
56 };
57}