From d843ffdf4f4db7d6b6ebaacbb4110c76d0d63eff Mon Sep 17 00:00:00 2001 From: Franck Chauvel Date: Wed, 17 Jun 2020 08:46:51 +0100 Subject: [PATCH] Config: Update dependencies for Docker image - Debian 9 to Debian 10 - Python 3.5 to Python 3.7 --- .circleci/config.yml | 2 +- Dockerfile | 4 ++-- docs/pages/changelog.md | 11 +++++++++++ install.sh | 12 ++++++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a862bbc..b66c0b1d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: sed -ir "s/COMMIT_HASH = None/COMMIT_HASH = \"${CIRCLE_SHA1}\"/I" camp/__init__.py - run: | docker build --no-cache \ - --build-arg PYTHON_VERSION=3.5 \ + --build-arg PYTHON_VERSION=3.7 \ --build-arg WITH_TESTS=--camp-with-tests \ --build-arg Z3_VERSION=4.8.6 \ --build-arg Z3_PLATFORM=x64-ubuntu-16.04 \ diff --git a/Dockerfile b/Dockerfile index 4530024c..1e5c0297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,11 @@ # of the MIT license. See the LICENSE file for details. # -FROM debian:9-slim +FROM debian:10-slim ARG DEBUG -ARG PYTHON_VERSION=3.5 +ARG PYTHON_VERSION=3.7 ARG WITH_TESTS ARG Z3_VERSION=4.8.4.d6df51951f4c ARG Z3_PLATFORM=x64-debian-8.11 diff --git a/docs/pages/changelog.md b/docs/pages/changelog.md index b0a8299b..64154111 100644 --- a/docs/pages/changelog.md +++ b/docs/pages/changelog.md @@ -18,6 +18,17 @@ changes that were made. now specified using the option `--mode|-m [MODE]`, where `MODE` can be either of `all`, `covering` or `atomic`. + * Update dependencies: + + * future 0.18.2 + * pyyaml 5.3.1 + * argparse 1.4.0 + * mock 4.0.2 + * deepdiff 4.3.2 + * green 3.2.0 + * Python 3.7 (Docker image) + * Debian 10 (Docker image) + * CAMP v0.9 * CAMP v0.9.0 (Nov. 19, 2019) diff --git a/install.sh b/install.sh index ae86985d..8af1cea5 100644 --- a/install.sh +++ b/install.sh @@ -8,6 +8,9 @@ set -o nounset DEBUG=false LOG_FILE=install.log +# PIP Options to avoid SSL errors +PIP_SSL_OPTIONS='--trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org' + # Default parameters values PYTHON_VERSION=3.5 @@ -243,11 +246,12 @@ ensure_pip_available() { local -r PIP_VERSION="19.0.3" if ! type pip >> ${LOG_FILE} 2>&1; then + install_packages python3-distutils ensure_curl_available printf "Installing Pip ${PIP_VERSION}.\n"; local -r PIP_INSTALLER_URL=https://bootstrap.pypa.io/get-pip.py \curl -sS -L -k -O ${PIP_INSTALLER_URL}; - python get-pip.py -qq pip==$PIP_VERSION; + python3 get-pip.py ${PIP_SSL_OPTIONS} -qq pip==$PIP_VERSION; rm get-pip.py else @@ -332,14 +336,14 @@ ensure_CAMP_available() { if [[ "${CAMP_FROM_SOURCES}" == "true" ]] then - pip install --upgrade setuptools >> ${LOG_FILE} 2>&1 - pip install .${CAMP_WITH_TESTS} >> ${LOG_FILE} 2>&1 + pip install ${PIP_SSL_OPTIONS} --upgrade setuptools >> ${LOG_FILE} 2>&1; + pip install ${PIP_SSL_OPTIONS} .${CAMP_WITH_TESTS} >> ${LOG_FILE} 2>&1; else local -r GITHUB_URL="https://github.com/STAMP-project/camp.git@%s#egg=camp" local -r CAMP_URL=$(printf ${GITHUB_URL} ${CAMP_VERSION}) - pip install git+${CAMP_URL} >> ${LOG_FILE} 2>&1 + pip install ${PIP_SSL_OPTIONS} git+${CAMP_URL} >> ${LOG_FILE} 2>&1; if [ $? -eq 0 ]; then printf "CAMP (%s) ready.\n" "${CAMP_VERSION}" else