Merge pull request #252070 from kira-bruneau/python3Packages.debugpy

python310Packages.debugpy: disable process test timeouts
This commit is contained in:
Kira Bruneau 2023-08-28 23:19:11 -04:00 committed by GitHub
commit 6d1a6dde4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@
, pythonAtLeast
, fetchFromGitHub
, substituteAll
, fetchpatch
, gdb
, django
, flask
@ -49,6 +50,13 @@ buildPythonPackage rec {
# To avoid this issue, debugpy should be installed using python.withPackages:
# python.withPackages (ps: with ps; [ debugpy ])
./fix-test-pythonpath.patch
# Support disabling process timeouts when set to 0
# See https://github.com/microsoft/debugpy/pull/1286
(fetchpatch {
url = "https://github.com/microsoft/debugpy/commit/1569cc8319350afcc5ba8630660f599d514ac3bb.patch";
hash = "sha256-v4GKLb2M20F1egAGtix9cTkSzBnvSgSSphSQST5p63w=";
})
] ++ lib.optionals stdenv.isLinux [
# Hard code GDB path (used to attach to process)
(substituteAll {
@ -91,11 +99,8 @@ buildPythonPackage rec {
];
preCheck = ''
# Scale default timeouts by a factor of 4 to avoid flaky builds
# https://github.com/microsoft/debugpy/pull/1286 if merged would
# allow us to disable the timeouts altogether
export DEBUGPY_PROCESS_SPAWN_TIMEOUT=60
export DEBUGPY_PROCESS_EXIT_TIMEOUT=20
export DEBUGPY_PROCESS_SPAWN_TIMEOUT=0
export DEBUGPY_PROCESS_EXIT_TIMEOUT=0
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
# https://github.com/python/cpython/issues/74570#issuecomment-1093748531
export no_proxy='*';