2021-02-12 14:42:25 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-25 08:37:59 +01:00
|
|
|
, fetchFromGitHub
|
2021-02-12 14:42:25 +00:00
|
|
|
, pythonOlder
|
|
|
|
, isPyPy
|
|
|
|
, lazy-object-proxy
|
|
|
|
, wrapt
|
2021-10-09 14:35:29 +01:00
|
|
|
, typing-extensions
|
2021-02-12 14:42:25 +00:00
|
|
|
, typed-ast
|
|
|
|
, pytestCheckHook
|
2021-07-25 08:37:59 +01:00
|
|
|
, setuptools-scm
|
|
|
|
, pylint
|
2017-05-27 11:23:41 +01:00
|
|
|
}:
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 11:23:41 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2022-01-14 00:58:07 +00:00
|
|
|
version = "2.9.3"; # Check whether the version is compatible with pylint
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2021-11-27 00:45:22 +00:00
|
|
|
disabled = pythonOlder "3.6.2";
|
2018-07-24 00:08:05 +01:00
|
|
|
|
2021-07-25 08:37:59 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-14 00:58:07 +00:00
|
|
|
sha256 = "1x77faggk1dgxy48ng31xj9h6p51w312kvk5zqgvd5f19nvznxyi";
|
2017-05-27 11:23:41 +01:00
|
|
|
};
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2021-11-27 00:45:22 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2021-10-09 14:35:29 +01:00
|
|
|
|
2021-07-25 08:37:59 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-02-12 14:42:25 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
|
|
|
wrapt
|
2021-10-09 14:35:29 +01:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2021-02-12 14:42:25 +00:00
|
|
|
] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2021-02-12 14:42:25 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2021-11-27 00:45:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
# assert (1, 1) == (1, 16)
|
|
|
|
"test_end_lineno_string"
|
|
|
|
];
|
|
|
|
|
2021-07-25 08:37:59 +01:00
|
|
|
passthru.tests = {
|
|
|
|
inherit pylint;
|
|
|
|
};
|
|
|
|
|
2017-05-27 11:23:41 +01:00
|
|
|
meta = with lib; {
|
2018-08-30 23:28:38 +01:00
|
|
|
description = "An abstract syntax tree for Python with inference support";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/PyCQA/astroid";
|
2021-02-18 16:29:23 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2017-05-27 11:23:41 +01:00
|
|
|
platforms = platforms.all;
|
2021-05-14 15:00:41 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-05-27 11:23:41 +01:00
|
|
|
};
|
|
|
|
}
|