From a374335788042e69c57f8d0b1c798285611ba009 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 20 Dec 2019 09:13:23 +0000 Subject: Install the latest pip and setuptools --- CHANGELOG.md | 4 ++++ Dockerfile | 15 ++------------- Gemfile.lock | 2 +- lib/license/management/version.rb | 2 +- run.sh | 4 +--- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb8e4f..a8fec3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # GitLab License management changelog +## v2.2.2 + +- Install the latest version of pip for both Python 2 and 3 at build time (!99) + ## v2.2.1 - Use `--prepare-no-fail` option to try to scan as much as possible. (!92) diff --git a/Dockerfile b/Dockerfile index f313e9d..5eac8c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,20 +24,9 @@ RUN add-apt-repository ppa:ondrej/php -y && apt-get update -y && \ php7.1-mbstring php7.1-intl php7.1-xml php7.1-soap -y && \ rm -rf /var/lib/apt/lists/* -# Warning! Environment variable PIP_VERSION causes the upgrade of pip to fail. -ARG VERSION_OF_PIP=19.1.1 -ENV VERSION_OF_PIP $VERSION_OF_PIP - -ARG SETUPTOOLS_VERSION=41.0.1 -ENV SETUPTOOLS_VERSION $SETUPTOOLS_VERSION - -ARG LOCAL_PYPI_INDEX=/pypi -ENV LOCAL_PYPI_INDEX $LOCAL_PYPI_INDEX - # Install setuptools, and fetch a recent version pip to be installed later on -RUN pip3 install --disable-pip-version-check setuptools==$SETUPTOOLS_VERSION && \ - mkdir $LOCAL_PYPI_INDEX && \ - wget -q -O $LOCAL_PYPI_INDEX/pip-$VERSION_OF_PIP.tar.gz https://files.pythonhosted.org/packages/93/ab/f86b61bef7ab14909bd7ec3cd2178feb0a1c86d451bc9bccd5a1aedcde5f/pip-$VERSION_OF_PIP.tar.gz +RUN pip install --upgrade pip setuptools \ + && python3 -m pip install --upgrade pip setuptools # Version of Python, defaults to Python 3.5 ARG LM_PYTHON_VERSION=3.5 diff --git a/Gemfile.lock b/Gemfile.lock index 64c1bbf..f705d00 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - license-management (2.2.1) + license-management (2.2.2) license_finder (= 5.11.1) GEM diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb index 8982b32..b4ad438 100644 --- a/lib/license/management/version.rb +++ b/lib/license/management/version.rb @@ -2,6 +2,6 @@ module License module Management - VERSION = '2.2.1' + VERSION = '2.2.2' end end diff --git a/run.sh b/run.sh index 404cf2b..6d29f6f 100755 --- a/run.sh +++ b/run.sh @@ -70,14 +70,12 @@ case "$LM_PYTHON_VERSION" in "2"|"2.7") echo "using python $LM_PYTHON_VERSION" LICENSE_FINDER_CLI_OPTS="--python-version 2 $LICENSE_FINDER_CLI_OPTS" - pip --version + pip2 --version ;; "3"|"3.5") echo "switching to python $LM_PYTHON_VERSION" LICENSE_FINDER_CLI_OPTS="--python-version 3 $LICENSE_FINDER_CLI_OPTS" - pip3 install --upgrade --no-index -f "file://$LOCAL_PYPI_INDEX" "pip==$VERSION_OF_PIP" - update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1 pip --version ;; -- cgit v1.2.3