depot/third_party/nixpkgs/pkgs/development/python-modules/astroid/default.nix
Default email a6d62be0d1 Project import generated by Copybara.
GitOrigin-RevId: ac169ec6371f0d835542db654a65e0f2feb07838
2021-12-26 18:43:05 +01:00

61 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, isPyPy
, lazy-object-proxy
, wrapt
, typing-extensions
, typed-ast
, pytestCheckHook
, setuptools-scm
, pylint
}:
buildPythonPackage rec {
pname = "astroid";
version = "2.9.0"; # Check whether the version is compatible with pylint
disabled = pythonOlder "3.6.2";
src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = "v${version}";
sha256 = "sha256-sImWiWULZ1HS3JyQHfEhc4ZRZ6anOUTqZZGNIYj2MaY=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
lazy-object-proxy
wrapt
] ++ lib.optionals (pythonOlder "3.10") [
typing-extensions
] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;
checkInputs = [
pytestCheckHook
];
disabledTests = [
# assert (1, 1) == (1, 16)
"test_end_lineno_string"
];
passthru.tests = {
inherit pylint;
};
meta = with lib; {
description = "An abstract syntax tree for Python with inference support";
homepage = "https://github.com/PyCQA/astroid";
license = licenses.lgpl21Plus;
platforms = platforms.all;
maintainers = with maintainers; [ ];
};
}