nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 typing-extensions,
8 pip,
9 pylint,
10 pytestCheckHook,
11}:
12
13buildPythonPackage (finalAttrs: {
14 pname = "astroid";
15 version = "4.0.3"; # Check whether the version is compatible with pylint
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "PyCQA";
20 repo = "astroid";
21 tag = "v${finalAttrs.version}";
22 hash = "sha256-5p1xY6EWviSgmrLVOx3w7RcG/Vpx+sUtVndoxXrIFTQ=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = lib.optionals (pythonOlder "3.11") [ typing-extensions ];
28
29 nativeCheckInputs = [
30 pip
31 pytestCheckHook
32 ];
33
34 disabledTests = [
35 # UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html.
36 "test_identify_old_namespace_package_protocol"
37 ];
38
39 disabledTestPaths = [
40 # requires mypy
41 "tests/test_raw_building.py"
42 ];
43
44 passthru.tests = {
45 inherit pylint;
46 };
47
48 meta = {
49 changelog = "https://github.com/PyCQA/astroid/blob/${finalAttrs.src.tag}/ChangeLog";
50 description = "Abstract syntax tree for Python with inference support";
51 homepage = "https://github.com/PyCQA/astroid";
52 license = lib.licenses.lgpl21Plus;
53 maintainers = with lib.maintainers; [ GaetanLepage ];
54 };
55})