[build]: Upgrade pip3 before pip2 (#5743)

Upgrading pip3 after pip2 caused the pip command to be aliased to the pip3 command. However, since we are still transitioning from Python 2 to Python 3, most pip commands in the codebase are expecting pip to alias to pip2. The proper solution here is to explicitly call pip2 and pip3, and no longer call pip, however this will require extensive changes and testing, so to quickly fix this issue, we upgraded pip2 after pip3 to ensure that pip2 is installed after pip3.
This commit is contained in:
Joe LeVeque 2020-10-29 19:01:17 -07:00 committed by GitHub
parent 6145e4f6f1
commit b132ca0980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -15,8 +15,8 @@ RUN apt-get update && \
python-setuptools \
python3-setuptools
RUN pip2 install --upgrade pip
RUN pip3 install --upgrade pip
RUN pip2 install --upgrade pip
RUN apt-get purge -y python-pip python3-pip
# For sonic-config-engine Python 3 package

View File

@ -334,8 +334,8 @@ RUN export VERSION=1.14.2 \
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
&& rm go$VERSION.linux-*.tar.gz
RUN pip2 install --upgrade pip
RUN pip3 install --upgrade pip
RUN pip2 install --upgrade pip
RUN apt-get purge -y python-pip python3-pip
# For building Python packages

View File

@ -330,8 +330,8 @@ RUN export VERSION=1.14.2 \
&& echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bash.bashrc \
&& rm go$VERSION.linux-*.tar.gz
RUN pip2 install --upgrade pip
RUN pip3 install --upgrade pip
RUN pip2 install --upgrade pip
RUN apt-get purge -y python-pip python3-pip
# For p4 build