2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonAtLeast
|
2021-03-19 17:17:44 +00:00
|
|
|
, pythonOlder
|
|
|
|
, isPyPy
|
|
|
|
, lazy-object-proxy
|
|
|
|
, wrapt
|
2021-12-06 16:07:01 +00:00
|
|
|
, typing-extensions
|
2021-03-19 17:17:44 +00:00
|
|
|
, typed-ast
|
|
|
|
, pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, pylint
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "2.11.2"; # Check whether the version is compatible with pylint
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabled = pythonOlder "3.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-adnvJCchsMWQxsIlenndUb6Mw1MgCNAanZcTmssmsEc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
|
|
|
wrapt
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2021-03-19 17:17:44 +00:00
|
|
|
] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTests = [
|
|
|
|
# assert (1, 1) == (1, 16)
|
|
|
|
"test_end_lineno_string"
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# AssertionError: Lists differ: ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'Protocol', 'object'] != ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'object']
|
|
|
|
"test_mro_typing_extensions"
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit pylint;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An abstract syntax tree for Python with inference support";
|
|
|
|
homepage = "https://github.com/PyCQA/astroid";
|
2021-03-19 17:17:44 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|