1{ lib
2, stdenv
3, buildPythonPackage
4, pythonOlder
5, fetchFromGitHub
6, django
7, pytestCheckHook
8, parso
9}:
10
11buildPythonPackage rec {
12 pname = "jedi";
13 version = "0.18.1";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "davidhalter";
18 repo = "jedi";
19 rev = "v${version}";
20 sha256 = "sha256-wWNPNi16WtefvB7GcQBnWMbHVlVzxSFs4TKRqEasuR0=";
21 fetchSubmodules = true;
22 };
23
24 propagatedBuildInputs = [ parso ];
25
26 checkInputs = [
27 django
28 pytestCheckHook
29 ];
30
31 preCheck = ''
32 export HOME=$TMPDIR
33 '';
34
35 disabledTests = [
36 # Assertions mismatches with pytest>=6.0
37 "test_completion"
38
39 # sensitive to platform, causes false negatives on darwin
40 "test_import"
41 ] ++ lib.optionals (stdenv.isAarch64 && pythonOlder "3.9") [
42 # AssertionError: assert 'foo' in ['setup']
43 "test_init_extension_module"
44 ];
45
46 meta = with lib; {
47 homepage = "https://github.com/davidhalter/jedi";
48 description = "An autocompletion tool for Python that can be used for text editors";
49 license = licenses.mit;
50 maintainers = with maintainers; [ ];
51 };
52}