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