at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonAtLeast 5, pythonOlder 6, isPyPy 7, lazy-object-proxy 8, setuptools 9, setuptools-scm 10, typing-extensions 11, typed-ast 12, pylint 13, pytestCheckHook 14, wrapt 15}: 16 17buildPythonPackage rec { 18 pname = "astroid"; 19 version = "2.11.7"; # Check whether the version is compatible with pylint 20 21 disabled = pythonOlder "3.6.2"; 22 23 src = fetchFromGitHub { 24 owner = "PyCQA"; 25 repo = pname; 26 rev = "v${version}"; 27 sha256 = "sha256-HpniGxKf+daMh/sxP9T9UriYRrUFWqk7kDa8r+EqtVI="; 28 }; 29 30 SETUPTOOLS_SCM_PRETEND_VERSION = version; 31 32 nativeBuildInputs = [ 33 setuptools-scm 34 ]; 35 36 propagatedBuildInputs = [ 37 lazy-object-proxy 38 setuptools 39 wrapt 40 ] ++ lib.optionals (pythonOlder "3.10") [ 41 typing-extensions 42 ] ++ lib.optionals (!isPyPy && pythonOlder "3.8") [ 43 typed-ast 44 ]; 45 46 checkInputs = [ 47 pytestCheckHook 48 ]; 49 50 disabledTests = [ 51 # AssertionError: Lists differ: ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'Protocol', 'object'] != ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'object'] 52 "test_mro_typing_extensions" 53 ]; 54 55 passthru.tests = { 56 inherit pylint; 57 }; 58 59 meta = with lib; { 60 description = "An abstract syntax tree for Python with inference support"; 61 homepage = "https://github.com/PyCQA/astroid"; 62 license = licenses.lgpl21Plus; 63 maintainers = with maintainers; [ SuperSandro2000 ]; 64 }; 65}