1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 pythonOlder,
6 fetchFromGitHub,
7
8 # build-system
9 setuptools,
10
11 # dependencies
12 parso,
13
14 # tests
15 attrs,
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "jedi";
21 version = "0.19.1";
22 pyproject = true;
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "davidhalter";
28 repo = "jedi";
29 rev = "v${version}";
30 hash = "sha256-MD7lIKwAwULZp7yLE6jiao2PU6h6RIl0SQ/6b4Lq+9I=";
31 fetchSubmodules = true;
32 };
33
34 nativeBuildInputs = [ setuptools ];
35
36 propagatedBuildInputs = [ parso ];
37
38 nativeCheckInputs = [
39 attrs
40 pytestCheckHook
41 ];
42
43 preCheck = ''
44 export HOME=$TMPDIR
45 '';
46
47 disabledTests =
48 [
49 # sensitive to platform, causes false negatives on darwin
50 "test_import"
51 ]
52 ++ lib.optionals (stdenv.isAarch64 && pythonOlder "3.9") [
53 # AssertionError: assert 'foo' in ['setup']
54 "test_init_extension_module"
55 ];
56
57 meta = with lib; {
58 description = "An autocompletion tool for Python that can be used for text editors";
59 homepage = "https://github.com/davidhalter/jedi";
60 changelog = "https://github.com/davidhalter/jedi/blob/${version}/CHANGELOG.rst";
61 license = licenses.mit;
62 maintainers = with maintainers; [ ];
63 };
64}