From de9627a6561bb5a3c6236fe8d7bb07978fd59aa8 Mon Sep 17 00:00:00 2001 From: Sam Schlegel Date: Thu, 13 Mar 2025 18:27:04 +0000 Subject: [PATCH] Explicitly call sys.exit in the modules_mapping generator When running python with `-S` to disable the `site` module, you need to explicitly call `sys.exit` instead of the `exit` function which seems to be a remnant of the REPL --- gazelle/modules_mapping/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazelle/modules_mapping/generator.py b/gazelle/modules_mapping/generator.py index d5ddca2ef2..ea11f3e236 100644 --- a/gazelle/modules_mapping/generator.py +++ b/gazelle/modules_mapping/generator.py @@ -164,4 +164,4 @@ def data_has_purelib_or_platlib(path): generator = Generator( sys.stderr, args.output_file, args.exclude_patterns, args.include_stub_packages ) - exit(generator.run(args.wheels)) + sys.exit(generator.run(args.wheels))