2021-02-12 15:42:25 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-07-25 09:37:59 +02:00
|
|
|
, fetchFromGitHub
|
2022-03-31 22:33:54 +02:00
|
|
|
, pythonAtLeast
|
2021-02-12 15:42:25 +01:00
|
|
|
, pythonOlder
|
|
|
|
, isPyPy
|
|
|
|
, lazy-object-proxy
|
2022-06-01 18:34:19 +02:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
2021-10-09 15:35:29 +02:00
|
|
|
, typing-extensions
|
2021-02-12 15:42:25 +01:00
|
|
|
, typed-ast
|
2021-07-25 09:37:59 +02:00
|
|
|
, pylint
|
2022-06-01 18:34:19 +02:00
|
|
|
, pytestCheckHook
|
|
|
|
, wrapt
|
2017-05-27 12:23:41 +02:00
|
|
|
}:
|
2017-03-03 03:05:54 +01:00
|
|
|
|
2017-05-27 12:23:41 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2022-07-15 19:49:53 +02:00
|
|
|
version = "2.11.7"; # Check whether the version is compatible with pylint
|
2017-03-03 03:05:54 +01:00
|
|
|
|
2021-11-27 01:45:22 +01:00
|
|
|
disabled = pythonOlder "3.6.2";
|
2018-07-24 01:08:05 +02:00
|
|
|
|
2021-07-25 09:37:59 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-07-15 19:49:53 +02:00
|
|
|
sha256 = "sha256-HpniGxKf+daMh/sxP9T9UriYRrUFWqk7kDa8r+EqtVI=";
|
2017-05-27 12:23:41 +02:00
|
|
|
};
|
2017-03-03 03:05:54 +01:00
|
|
|
|
2021-11-27 01:45:22 +01:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2021-10-09 15:35:29 +02:00
|
|
|
|
2021-07-25 09:37:59 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-02-12 15:42:25 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
2022-06-01 18:34:19 +02:00
|
|
|
setuptools
|
2021-02-12 15:42:25 +01:00
|
|
|
wrapt
|
2021-10-09 15:35:29 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2022-06-01 18:34:19 +02:00
|
|
|
] ++ lib.optionals (!isPyPy && pythonOlder "3.8") [
|
|
|
|
typed-ast
|
|
|
|
];
|
2017-03-03 03:05:54 +01:00
|
|
|
|
2021-02-12 15:42:25 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2017-03-03 03:05:54 +01:00
|
|
|
|
2021-11-27 01:45:22 +01:00
|
|
|
disabledTests = [
|
2022-03-31 22:33:54 +02:00
|
|
|
# AssertionError: Lists differ: ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'Protocol', 'object'] != ['ABC[16 chars]yBase', 'Final', 'Generic', 'MyProtocol', 'object']
|
|
|
|
"test_mro_typing_extensions"
|
2021-11-27 01:45:22 +01:00
|
|
|
];
|
|
|
|
|
2021-07-25 09:37:59 +02:00
|
|
|
passthru.tests = {
|
|
|
|
inherit pylint;
|
|
|
|
};
|
|
|
|
|
2017-05-27 12:23:41 +02:00
|
|
|
meta = with lib; {
|
2018-08-31 00:28:38 +02:00
|
|
|
description = "An abstract syntax tree for Python with inference support";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PyCQA/astroid";
|
2021-02-18 17:29:23 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
2022-06-01 18:34:19 +02:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2017-05-27 12:23:41 +02:00
|
|
|
};
|
|
|
|
}
|