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
|
2022-06-26 10:26:21 +00:00
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
, typing-extensions
|
2021-03-19 17:17:44 +00:00
|
|
|
, typed-ast
|
2021-08-05 21:33:18 +00:00
|
|
|
, pylint
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, wrapt
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "2.14.2"; # Check whether the version is compatible with pylint
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-SIBzn57UNn/sLuDWt391M/kcCyjCocHmL5qi2cSX2iA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
nativeBuildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
setuptools
|
2021-08-05 21:33:18 +00:00
|
|
|
];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
|
|
|
wrapt
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
2021-12-06 16:07:01 +00:00
|
|
|
typing-extensions
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ lib.optionals (!isPyPy && pythonOlder "3.8") [
|
|
|
|
typed-ast
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-19 17:17:44 +00:00
|
|
|
pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
typing-extensions
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
# DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('tests.testdata.python3.data.path_pkg_resources_1.package')`.
|
|
|
|
"test_identify_old_namespace_package_protocol"
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit pylint;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/PyCQA/astroid/blob/${src.rev}/ChangeLog";
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|