Skip to content

Commit 39b1be6

Browse files
committed
Better check for ensurepip existence
1 parent ead3530 commit 39b1be6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bootstrap.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,13 @@ fi
8888
export PIP_USER=0
8989

9090
# Check if ensurepip is installed
91-
$python -m ensurepip --version &> /dev/null
92-
epip=$?
93-
94-
export PATH=$(pwd)/external/usr/bin:$PATH
95-
96-
# Install pip for Python 3
97-
if [ $epip -eq 0 ]; then
91+
if $python -m ensurepip --version &> /dev/null; then
92+
# Install pip for Python 3
9893
CMD $python -m ensurepip --root $(pwd)/external/ --default-pip
9994
fi
10095

96+
export PATH=$(pwd)/external/usr/bin:$PATH
97+
10198
# ensurepip installs pip in `external/usr/` whereas the `--root` option installs
10299
# everything under `external/`. That's why we include both in the PYTHONPATH
103100

0 commit comments

Comments
 (0)