1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 fetchFromGitHub,
6 setuptools,
7 numpy,
8 psutil,
9 pytestCheckHook,
10 pythonAtLeast,
11 pythonOlder,
12 trio,
13 untangle,
14}:
15
16buildPythonPackage rec {
17 pname = "pydevd";
18 version = "3.0.3";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "fabioz";
25 repo = "PyDev.Debugger";
26 rev = "pydev_debugger_${lib.replaceStrings [ "." ] [ "_" ] version}";
27 hash = "sha256-aylmLN7lVUza2lt2K48rJsx3XatXPgPjcmPZ05raLX0=";
28 };
29
30 __darwinAllowLocalNetworking = true;
31
32 build-system = [ setuptools ];
33
34 nativeCheckInputs = [
35 numpy
36 psutil
37 pytestCheckHook
38 trio
39 untangle
40 ];
41
42 disabledTests =
43 [
44 # Require network connection
45 "test_completion_sockets_and_messages"
46 "test_path_translation"
47 "test_attach_to_pid_no_threads"
48 "test_attach_to_pid_halted"
49 "test_remote_debugger_threads"
50 "test_path_translation_and_source_reference"
51 "test_attach_to_pid"
52 "test_terminate"
53 "test_gui_event_loop_custom"
54 # AssertionError: assert '/usr/bin/' == '/usr/bin'
55 # https://github.com/fabioz/PyDev.Debugger/issues/227
56 "test_to_server_and_to_client"
57 # AssertionError pydevd_tracing.set_trace_to_threads(tracing_func) == 0
58 "test_step_next_step_in_multi_threads"
59 "test_tracing_basic"
60 "test_tracing_other_threads"
61 # subprocess.CalledProcessError
62 "test_find_main_thread_id"
63 ]
64 ++ lib.optionals (pythonAtLeast "3.12") [
65 "test_case_handled_and_unhandled_exception_generator"
66 "test_case_stop_async_iteration_exception"
67 "test_case_unhandled_exception_generator"
68 "test_function_breakpoints_async"
69 ]
70 ++ lib.optionals stdenv.isDarwin [
71 "test_multiprocessing_simple"
72 "test_evaluate_exception_trace"
73 ];
74
75 pythonImportsCheck = [ "pydevd" ];
76
77 meta = with lib; {
78 description = "PyDev.Debugger (used in PyDev, PyCharm and VSCode Python)";
79 homepage = "https://github.com/fabioz/PyDev.Debugger";
80 license = licenses.epl10;
81 maintainers = with maintainers; [ onny ];
82 mainProgram = "pydevd";
83 };
84}