2021-03-19 17:17:44 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
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-02-10 20:34:41 +00:00
|
|
|
version = "2.9.3"; # 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-02-10 20:34:41 +00:00
|
|
|
sha256 = "1x77faggk1dgxy48ng31xj9h6p51w312kvk5zqgvd5f19nvznxyi";
|
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"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|