From 159ac1e93f8d28ab32cfb64eec9489e25d59bc97 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 7 Oct 2025 10:14:46 -0400 Subject: [PATCH] Don't override PYTHONPATH in the Lit config The lit.cfg file was overriding PYTHONPATH to use the contents in /build if that existed. This means that if you install the package locally with `pip install .` and get that temporary build directory, it will be preferred over the just-built version that gets installed when running `tox`. Instead, leave PYTHONPATH alone and let it be set by `tox`. --- tests/lit.cfg | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/lit.cfg b/tests/lit.cfg index 3fcd739a..366f6926 100644 --- a/tests/lit.cfg +++ b/tests/lit.cfg @@ -27,11 +27,6 @@ config.test_exec_root = 'test_run_tmp' config.target_triple = None -src_root = os.path.join(config.test_source_root, '..') -try: - config.environment['PYTHONPATH'] = glob.glob('%s/build/lib.*' % src_root)[0] -except: - pass # LNT needs a UTF-8 locale when running in Python 3 mode. Rely on the host # environment to provide it rather than assume a specific UTF-8 locale is # present. @@ -41,6 +36,7 @@ config.environment['PYTHONDONTWRITEBYTECODE'] = "1" config.environment['SUDO_CMD'] = "" config.environment['I'] = "" +src_root = os.path.join(config.test_source_root, '..') config.substitutions.append(('%src_root', src_root)) config.substitutions.append(('%{src_root}', src_root)) config.substitutions.append(('%{shared_inputs}', os.path.join(