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
|
|
|
|
, wrapt
|
|
|
|
, typed-ast
|
|
|
|
, pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, pylint
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "astroid";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "2.5.6"; # Check whether the version is compatible with pylint
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-/nWXzuWkerUDvFT/tJTZuhfju46MAM0cwosVH9BXoY8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION=version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# From astroid/__pkginfo__.py
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lazy-object-proxy
|
|
|
|
wrapt
|
|
|
|
] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +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; {
|
|
|
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|