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
|
2022-06-26 10:26:21 +00:00
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
, typing-extensions
|
2023-10-09 19:29:22 +00:00
|
|
|
, pip
|
2021-08-05 21:33:18 +00:00
|
|
|
, pylint
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.0"; # Check whether the version is compatible with pylint
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "astroid";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-+cTQHbqoucaNi7rPoyH6Cu07vZMS8KWn5C/A3NXRSwE=";
|
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
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
|
2021-12-06 16:07:01 +00:00
|
|
|
typing-extensions
|
2022-06-26 10:26:21 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
pip
|
2021-03-19 17:17:44 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +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; {
|
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;
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = with maintainers; [ GaetanLepage ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|