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.2";
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-2nDQJS6LIaq91PG3Av85OMFfs1ZwId00K/kvog3PGXE=";
31 fetchSubmodules = true;
32 };
33
34 build-system = [ setuptools ];
35
36 dependencies = [ parso ];
37
38 nativeCheckInputs = [
39 attrs
40 pytestCheckHook
41 ];
42
43 preCheck = ''
44 export HOME=$TMPDIR
45 '';
46
47 disabledTests = [
48 # sensitive to platform, causes false negatives on darwin
49 "test_import"
50 ]
51 ++ lib.optionals (stdenv.targetPlatform.useLLVM or false) [
52 # InvalidPythonEnvironment: The python binary is potentially unsafe.
53 "test_create_environment_executable"
54 # AssertionError: assert ['', '.1000000000000001'] == ['', '.1']
55 "test_dict_keys_completions"
56 # AssertionError: assert ['', '.1000000000000001'] == ['', '.1']
57 "test_dict_completion"
58 ];
59
60 meta = with lib; {
61 description = "Autocompletion tool for Python that can be used for text editors";
62 homepage = "https://github.com/davidhalter/jedi";
63 changelog = "https://github.com/davidhalter/jedi/blob/${version}/CHANGELOG.rst";
64 license = licenses.mit;
65 maintainers = [ ];
66 };
67}