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 ded5840
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ 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"

# Install other dependencies for tests
if [[ $PYTHON_VERSION == 3 ]]; then
OSBS_CLIENT_DEPS="python3-PyYAML"
else
OSBS_CLIENT_DEPS="PyYAML"
fi
$RUN $PKG install -y $OSBS_CLIENT_DEPS
PIP_DEPS="pip setuptools wheel urllib3 requests six"
$RUN $PIP install -U "$PIP_DEPS"

RUN="$ENGINE exec -ti $CONTAINER_NAME"

$RUN $PIP install --upgrade --force-reinstall PyYAML

# Install latest osbs-client by installing dependencies from the master branch
# and running pip install with '--no-deps' to avoid compilation
Expand All @@ -99,16 +97,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 ded5840

Please sign in to comment.