Skip to content

Commit d830eb4

Browse files
authored
build(ci): make install-py-dev to install wheel (#23840) [skip ci]
The Python version installed via `pyenv` does not come with `wheel` pre-installed. Installing `wheel` will speed up the installation of Python dependencies
1 parent 258d95c commit d830eb4

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ install-js-dev: node-version-check
9090
yarn check --verify-tree || yarn install --check-files
9191

9292
install-py-dev: ensure-pinned-pip
93+
ifeq ($(shell command -v wheel 2> /dev/null),)
94+
# The Python version installed via pyenv does not come with wheel pre-installed
95+
# Installing wheel will speed up installation of Python dependencies
96+
@$(PIP) install wheel
97+
endif
9398
@echo "--> Installing Sentry (for development)"
9499
ifdef BIG_SUR
95100
# grpcio 1.35.0 is very painful to compile on Big Sur, and is not really surfaced in testing anyways.

scripts/pyenv_setup.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,10 @@ setup_pyenv() {
108108

109109
# If the script is called with the "dot space right" approach (. ./scripts/pyenv_setup.sh),
110110
# the effects of this will be persistent outside of this script
111-
echo "Activating pyenv"
111+
echo "Activating pyenv and validating Python version"
112112
eval "$(pyenv init -)"
113113
python_version=$(python -V | sed s/Python\ //g)
114-
[[ $python_version != $(cat .python-version) ]] && echo "Wrong Python version: $python_version" && exit 1
115-
# The Python version installed via pyenv does not come with wheel pre-installed
116-
# Installing wheel will speed up installation of Python dependencies
117-
PIP_DISABLE_PIP_VERSION_CHECK=on pip install wheel
114+
[[ $python_version == $(cat .python-version) ]] || (echo "Wrong Python version: $python_version" && exit 1)
118115
}
119116

120117
setup_pyenv

0 commit comments

Comments
 (0)