Skip to content

Commit

Permalink
Manually update pip/setuptools...
Browse files Browse the repository at this point in the history
...to guard against deprecation failures.
pip and setuptools are smart enough to work
out version compatibility for the current os/Py.

Also bypasses ancient pypa/setuptools#937

Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
  • Loading branch information
ben-alkov committed Jun 1, 2020
1 parent 893a501 commit eaa90d4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ function setup_kojic() {
# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
$RUN mkdir -p /usr/local/lib/python3.6/site-packages/
fi
RUN="$ENGINE exec -ti $CONTAINER_NAME"

$RUN $PIP install -U pip
$RUN $PIP install -U setuptools

RUN="$ENGINE exec -ti $CONTAINER_NAME"

# Install other dependencies for tests
if [[ $PYTHON_VERSION == 3 ]]; then
Expand Down Expand Up @@ -99,16 +103,6 @@ RUN="$ENGINE exec -ti $CONTAINER_NAME"
$RUN $PIP install --upgrade --force-reinstall \
git+https://github.com/containerbuildsystem/dockerfile-parse

# CentOS needs to have setuptools updates to make pytest-cov work
# setuptools will no longer support python2 starting on version 45
if [[ $OS != "fedora" ]]; then
$RUN $PIP install -U 'setuptools<45'

# Watch out for https://github.com/pypa/setuptools/issues/937
$RUN curl -O https://bootstrap.pypa.io/2.6/get-pip.py
$RUN $PYTHON get-pip.py
fi

# https://github.com/jaraco/zipp/issues/28
if [[ $PYTHON_VERSION == 2 ]]; then
$RUN $PIP install zipp==1.0.0
Expand Down

0 comments on commit eaa90d4

Please sign in to comment.