Skip to content

Commit e538304

Browse files
authored
Don't override PYTHONPATH in the Lit config (#69)
The lit.cfg file was overriding PYTHONPATH to use the contents in <PWD>/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`.
1 parent 11c2d9e commit e538304

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/lit.cfg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ config.test_exec_root = 'test_run_tmp'
2727

2828
config.target_triple = None
2929

30-
src_root = os.path.join(config.test_source_root, '..')
31-
try:
32-
config.environment['PYTHONPATH'] = glob.glob('%s/build/lib.*' % src_root)[0]
33-
except:
34-
pass
3530
# LNT needs a UTF-8 locale when running in Python 3 mode. Rely on the host
3631
# environment to provide it rather than assume a specific UTF-8 locale is
3732
# present.
@@ -41,6 +36,7 @@ config.environment['PYTHONDONTWRITEBYTECODE'] = "1"
4136
config.environment['SUDO_CMD'] = ""
4237
config.environment['I'] = ""
4338

39+
src_root = os.path.join(config.test_source_root, '..')
4440
config.substitutions.append(('%src_root', src_root))
4541
config.substitutions.append(('%{src_root}', src_root))
4642
config.substitutions.append(('%{shared_inputs}', os.path.join(

0 commit comments

Comments
 (0)