2021-02-12 14:42:25 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-25 07:37:59 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-12 14:42:25 +00:00
|
|
|
, pythonOlder
|
|
|
|
, isPyPy
|
|
|
|
, lazy-object-proxy
|
2022-06-01 16:34:19 +00:00
|
|
|
, setuptools
|
2023-08-12 06:09:27 +00:00
|
|
|
, wheel
|
2021-10-09 13:35:29 +00:00
|
|
|
, typing-extensions
|
2021-02-12 14:42:25 +00:00
|
|
|
, typed-ast
|
2023-08-12 06:09:27 +00:00
|
|
|
, pip
|
2021-07-25 07:37:59 +00:00
|
|
|
, pylint
|
2022-06-01 16:34:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, wrapt
|
2017-05-27 10:23:41 +00:00
|
|
|
}:
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2023-07-27 22:58:41 +00:00
|
|
|
version = "2.15.6"; # Check whether the version is compatible with pylint
|
2022-11-13 16:51:34 +00:00
|
|
|
format = "pyproject";
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2022-11-13 16:51:34 +00:00
|
|
|
disabled = pythonOlder "3.7.2";
|
2018-07-23 23:08:05 +00:00
|
|
|
|
2021-07-25 07:37:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
2022-12-30 19:12:55 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-27 22:58:41 +00:00
|
|
|
hash = "sha256-0oNNEVD8rYGkM11nGUD+XMwE7xgk7mJIaplrAXaECFg=";
|
2017-05-27 10:23:41 +00:00
|
|
|
};
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2021-07-25 07:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
2022-11-13 16:51:34 +00:00
|
|
|
setuptools
|
2023-08-12 06:09:27 +00:00
|
|
|
wheel
|
2021-07-25 07:37:59 +00:00
|
|
|
];
|
|
|
|
|
2021-02-12 14:42:25 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
|
|
|
wrapt
|
2023-02-27 01:14:07 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
2021-10-09 13:35:29 +00:00
|
|
|
typing-extensions
|
2022-06-01 16:34:19 +00:00
|
|
|
] ++ lib.optionals (!isPyPy && pythonOlder "3.8") [
|
|
|
|
typed-ast
|
|
|
|
];
|
2017-03-03 02:05:54 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-12 06:09:27 +00:00
|
|
|
pip
|
2021-02-12 14:42:25 +00:00
|
|
|
pytestCheckHook
|
2022-11-13 16:51:34 +00:00
|
|
|
typing-extensions
|
2021-11-27 00:45:22 +00:00
|
|
|
];
|
|
|
|
|
2023-02-27 01:14:07 +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-07-25 07:37:59 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit pylint;
|
|
|
|
};
|
|
|
|
|
2017-05-27 10:23:41 +00:00
|
|
|
meta = with lib; {
|
2023-03-03 04:18:29 +00:00
|
|
|
changelog = "https://github.com/PyCQA/astroid/blob/${src.rev}/ChangeLog";
|
2018-08-30 22:28:38 +00:00
|
|
|
description = "An abstract syntax tree for Python with inference support";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/PyCQA/astroid";
|
2021-02-18 16:29:23 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2023-07-23 17:30:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-05-27 10:23:41 +00:00
|
|
|
};
|
|
|
|
}
|