Skip to content

Commit 0b14e53

Browse files
vyasrritchie46
andauthored
Include the current working directory in PYTHONPATH (#152)
Co-authored-by: Ritchie Vink <ritchie46@gmail.com>
1 parent 5492c9d commit 0b14e53

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
.DEFAULT_GOAL := help
22

3-
PYTHONPATH=
3+
# Depending on how the Python interpreter was built and whether PYTHONSAFEPATH
4+
# is set the current working directory may not be on sys.path. It is especially
5+
# problematic if PYTHONSAFEPATH is set in rc files that load in every subshell
6+
# since this repository launches each query in a subshell. To get around such
7+
# problems, we add the current directory to PYTHONPATH unconditionally,
8+
# bypassing any dependence on the default values in sys.path.
9+
export PYTHONPATH := $(PWD):$(PYTHONPATH)
410
SHELL=/bin/bash
511
VENV=.venv
612
VENV_BIN=$(VENV)/bin

0 commit comments

Comments
 (0)