Skip to content

configure PyCharm default interpreter #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions chunks/lang-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ENV PATH="$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH"
ENV PIPENV_VENV_IN_PROJECT=true
ENV PYENV_ROOT="$HOME/.pyenv"

# configure the default intepreter for PyCharm
ENV PYCHARM_PYTHON_PATH="$HOME/.pyenv/shims/python"

RUN sudo install-packages \
# Install python compiling dependencies for pyenv
python3-pip make build-essential libssl-dev zlib1g-dev \
Expand Down
7 changes: 7 additions & 0 deletions tests/lang-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,10 @@
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]
assert:
- status == 0

- desc: "python default interpreter for PyCharm should be configured"
entrypoint: [bash, -c]
command: [echo $PYCHARM_PYTHON_PATH]
assert:
- status == 0
- stdout.indexOf("/home/gitpod/.pyenv/shims/python") != -1