Skip to content

Commit 9f39551

Browse files
committed
configure PyCharm default interpreter
1 parent ec89e3e commit 9f39551

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

chunks/lang-python/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ ENV PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
1111
ENV PIPENV_VENV_IN_PROJECT=true
1212
ENV PYENV_ROOT="$HOME/.pyenv"
1313

14+
# configure the default intepreter for PyCharm
15+
ENV PYCHARM_PYTHON_PATH="$HOME/.pyenv/shims/python"
16+
1417
RUN sudo install-packages \
1518
# Install python compiling dependencies for pyenv
1619
python3-pip make build-essential libssl-dev zlib1g-dev \

tests/lang-python.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@
5757
command: [rm /tmp/.vscs_add.lock; for sj in "$HOME/.vscode-server/data/Machine/settings.json" "/workspace/.vscode-remote/data/Machine/settings.json"; do mkdir -p $(dirname "$sj") "$GITPOD_REPO_ROOT" && touch "$sj" && bash -lic 'true' && if ! grep -q 'python' "$sj"; then exit 1; fi; done]
5858
assert:
5959
- status == 0
60+
61+
- desc: "python default interpreter for PyCharm should be configured"
62+
entrypoint: [bash, -c]
63+
command: [echo $PYCHARM_PYTHON_PATH]
64+
assert:
65+
- status == 0
66+
- stdout.indexOf("/home/gitpod/.pyenv/shims/python") != -1

0 commit comments

Comments
 (0)