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