From a3e6e28eeb834435eca5a7e96a8016c7314c603e Mon Sep 17 00:00:00 2001 From: Chris Crone Date: Wed, 4 Nov 2020 16:22:39 +0100 Subject: [PATCH] deps: Bump Python, Docker, base images Signed-off-by: Chris Crone --- .pre-commit-config.yaml | 2 +- Dockerfile | 18 ++++++++++-------- Jenkinsfile | 4 ++-- Release.Jenkinsfile | 8 ++++---- requirements-build.txt | 2 +- requirements-indirect.txt | 2 +- script/build/linux-entrypoint | 4 ++-- script/build/windows.ps1 | 6 +++--- script/setup/osx | 8 ++++---- script/test/all | 4 ++-- setup.py | 2 ++ tox.ini | 2 +- 12 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 05cd52026..45f6f6fcf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ sha: v1.3.4 hooks: - id: reorder-python-imports - language_version: 'python3.7' + language_version: 'python3.9' args: - --py3-plus - repo: https://github.com/asottile/pyupgrade diff --git a/Dockerfile b/Dockerfile index d4c8ea83b..fd9fd45c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ -ARG DOCKER_VERSION=19.03.8 -ARG PYTHON_VERSION=3.7.7 -ARG BUILD_ALPINE_VERSION=3.11 +ARG DOCKER_VERSION=19.03 +ARG PYTHON_VERSION=3.9.0 + +ARG BUILD_ALPINE_VERSION=3.12 ARG BUILD_CENTOS_VERSION=7 -ARG BUILD_DEBIAN_VERSION=slim-stretch -ARG RUNTIME_ALPINE_VERSION=3.11.5 +ARG BUILD_DEBIAN_VERSION=slim-buster + +ARG RUNTIME_ALPINE_VERSION=3.12 ARG RUNTIME_CENTOS_VERSION=7 -ARG RUNTIME_DEBIAN_VERSION=stretch-20200414-slim +ARG RUNTIME_DEBIAN_VERSION=buster-slim ARG DISTRO=alpine @@ -36,7 +38,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ git \ libc-dev \ libffi-dev \ - libgcc-6-dev \ + libgcc-8-dev \ libssl-dev \ make \ openssl \ @@ -57,7 +59,7 @@ RUN curl -L https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_ && ./configure --enable-optimizations --enable-shared --prefix=/usr LDFLAGS="-Wl,-rpath /usr/lib" \ && make altinstall RUN alternatives --install /usr/bin/python python /usr/bin/python2.7 50 -RUN alternatives --install /usr/bin/python python /usr/bin/python3.7 60 +RUN alternatives --install /usr/bin/python python /usr/bin/python$(echo "${PYTHON_VERSION}" | cut -c1-3) 60 RUN curl https://bootstrap.pypa.io/get-pip.py | python - FROM build-${DISTRO} AS build diff --git a/Jenkinsfile b/Jenkinsfile index 4c7709103..40629216a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,8 @@ #!groovy -def dockerVersions = ['19.03.8'] +def dockerVersions = ['19.03.13'] def baseImages = ['alpine', 'debian'] -def pythonVersions = ['py37'] +def pythonVersions = ['py39'] pipeline { agent none diff --git a/Release.Jenkinsfile b/Release.Jenkinsfile index 91cd89284..32c66c427 100644 --- a/Release.Jenkinsfile +++ b/Release.Jenkinsfile @@ -1,8 +1,8 @@ #!groovy -def dockerVersions = ['19.03.8', '18.09.9'] +def dockerVersions = ['19.03.13', '18.09.9'] def baseImages = ['alpine', 'debian'] -def pythonVersions = ['py37'] +def pythonVersions = ['py39'] pipeline { agent none @@ -84,7 +84,7 @@ pipeline { steps { checkout scm sh './script/setup/osx' - sh 'tox -e py37 -- tests/unit' + sh 'tox -e py39 -- tests/unit' sh './script/build/osx' dir ('dist') { checksum('docker-compose-Darwin-x86_64') @@ -121,7 +121,7 @@ pipeline { } steps { checkout scm - bat 'tox.exe -e py37 -- tests/unit' + bat 'tox.exe -e py39 -- tests/unit' powershell '.\\script\\build\\windows.ps1' dir ('dist') { checksum('docker-compose-Windows-x86_64.exe') diff --git a/requirements-build.txt b/requirements-build.txt index 9126f8af9..9ca8d6667 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1 +1 @@ -pyinstaller==3.6 +pyinstaller==4.1 diff --git a/requirements-indirect.txt b/requirements-indirect.txt index 9d9ae3684..17e8841f8 100644 --- a/requirements-indirect.txt +++ b/requirements-indirect.txt @@ -3,7 +3,7 @@ appdirs==1.4.4 attrs==20.1.0 bcrypt==3.1.7 cffi==1.14.1 -cryptography==3.0 +cryptography==3.2 distlib==0.3.1 entrypoints==0.3 filelock==3.0.12 diff --git a/script/build/linux-entrypoint b/script/build/linux-entrypoint index d75b9927d..a0e86ee26 100755 --- a/script/build/linux-entrypoint +++ b/script/build/linux-entrypoint @@ -3,7 +3,7 @@ set -ex CODE_PATH=/code -VENV="${CODE_PATH}"/.tox/py37 +VENV="${CODE_PATH}"/.tox/py39 cd "${CODE_PATH}" mkdir -p dist @@ -24,7 +24,7 @@ if [ ! -z "${BUILD_BOOTLOADER}" ]; then git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller cd /tmp/pyinstaller/bootloader # Checkout commit corresponding to version in requirements-build - git checkout v3.6 + git checkout v4.1 "${VENV}"/bin/python3 ./waf configure --no-lsb all "${VENV}"/bin/pip3 install .. cd "${CODE_PATH}" diff --git a/script/build/windows.ps1 b/script/build/windows.ps1 index 2778cc884..120cab33a 100644 --- a/script/build/windows.ps1 +++ b/script/build/windows.ps1 @@ -6,11 +6,11 @@ # # http://git-scm.com/download/win # -# 2. Install Python 3.7.x: +# 2. Install Python 3.9.x: # # https://www.python.org/downloads/ # -# 3. Append ";C:\Python37;C:\Python37\Scripts" to the "Path" environment variable: +# 3. Append ";C:\Python39;C:\Python39\Scripts" to the "Path" environment variable: # # https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx?mfr=true # @@ -39,7 +39,7 @@ if (Test-Path venv) { Get-ChildItem -Recurse -Include *.pyc | foreach ($_) { Remove-Item $_.FullName } # Create virtualenv -virtualenv -p C:\Python37\python.exe .\venv +virtualenv -p C:\Python39\python.exe .\venv # pip and pyinstaller generate lots of warnings, so we need to ignore them $ErrorActionPreference = "Continue" diff --git a/script/setup/osx b/script/setup/osx index 44ec4adcc..108ffd3e1 100755 --- a/script/setup/osx +++ b/script/setup/osx @@ -13,13 +13,13 @@ if ! [ ${DEPLOYMENT_TARGET} == "$(macos_version)" ]; then SDK_SHA1=dd228a335194e3392f1904ce49aff1b1da26ca62 fi -OPENSSL_VERSION=1.1.1g +OPENSSL_VERSION=1.1.1h OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -OPENSSL_SHA1=b213a293f2127ec3e323fb3cfc0c9807664fd997 +OPENSSL_SHA1=8d0d099e8973ec851368c8c775e05e1eadca1794 -PYTHON_VERSION=3.7.7 +PYTHON_VERSION=3.9.0 PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz -PYTHON_SHA1=8e9968663a214aea29659ba9dfa959e8a7d82b39 +PYTHON_SHA1=5744a10ba989d2badacbab3c00cdcb83c83106c7 # # Install prerequisites. diff --git a/script/test/all b/script/test/all index 57b76d5a9..64a5a99f2 100755 --- a/script/test/all +++ b/script/test/all @@ -11,7 +11,7 @@ docker run --rm \ "$TAG" tox -e pre-commit get_versions="docker run --rm - --entrypoint=/code/.tox/py37/bin/python + --entrypoint=/code/.tox/py39/bin/python $TAG /code/script/test/versions.py docker/docker-ce,moby/moby" @@ -23,7 +23,7 @@ fi BUILD_NUMBER=${BUILD_NUMBER-$USER} -PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py37} +PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py39} for version in $DOCKER_VERSIONS; do >&2 echo "Running tests against Docker $version" diff --git a/setup.py b/setup.py index e0d4340e5..712a862d8 100644 --- a/setup.py +++ b/setup.py @@ -102,5 +102,7 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], ) diff --git a/tox.ini b/tox.ini index 021c4c0f9..174fd5ccd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,pre-commit +envlist = py39,pre-commit [testenv] usedevelop=True