Merge pull request #6518 from ulyssessouza/bump-python-37

Bump python 3.6.8 -> 3.7.2
This commit is contained in:
Ian Campbell 2019-03-08 12:05:55 +00:00 committed by GitHub
commit c6c57fcf49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 30 additions and 25 deletions

View File

@ -13,7 +13,7 @@ jobs:
command: sudo pip install --upgrade tox==2.1.1 virtualenv==16.2.0 command: sudo pip install --upgrade tox==2.1.1 virtualenv==16.2.0
- run: - run:
name: unit tests name: unit tests
command: tox -e py27,py36,py37 -- tests/unit command: tox -e py27,py37 -- tests/unit
build-osx-binary: build-osx-binary:
macos: macos:

View File

@ -1,5 +1,5 @@
FROM docker:18.06.1 as docker FROM docker:18.06.1 as docker
FROM python:3.6 FROM python:3.7.2-stretch
RUN set -ex; \ RUN set -ex; \
apt-get update -qq; \ apt-get update -qq; \
@ -19,7 +19,7 @@ WORKDIR /code/
# FIXME(chris-crone): virtualenv 16.3.0 breaks build, force 16.2.0 until fixed # FIXME(chris-crone): virtualenv 16.3.0 breaks build, force 16.2.0 until fixed
RUN pip install virtualenv==16.2.0 RUN pip install virtualenv==16.2.0
RUN pip install tox==2.1.1 RUN pip install tox==2.9.1
ADD requirements.txt /code/ ADD requirements.txt /code/
ADD requirements-dev.txt /code/ ADD requirements-dev.txt /code/
@ -33,4 +33,4 @@ RUN tox --notest
ADD . /code/ ADD . /code/
RUN chown -R user /code/ RUN chown -R user /code/
ENTRYPOINT ["/code/.tox/py36/bin/docker-compose"] ENTRYPOINT ["/code/.tox/py37/bin/docker-compose"]

View File

@ -1,4 +1,4 @@
FROM python:3.6 FROM python:3.7.2-stretch
RUN set -ex; \ RUN set -ex; \
apt-get update -qq; \ apt-get update -qq; \
@ -36,4 +36,4 @@ RUN tox --notest
ADD . /code/ ADD . /code/
RUN chown -R user /code/ RUN chown -R user /code/
ENTRYPOINT ["/code/.tox/py36/bin/docker-compose"] ENTRYPOINT ["/code/.tox/py37/bin/docker-compose"]

3
Jenkinsfile vendored
View File

@ -37,7 +37,7 @@ def runTests = { Map settings ->
def pythonVersions = settings.get("pythonVersions", null) def pythonVersions = settings.get("pythonVersions", null)
if (!pythonVersions) { if (!pythonVersions) {
throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py27,py36')`") throw new Exception("Need Python versions to test. e.g.: `runTests(pythonVersions: 'py27,py37')`")
} }
if (!dockerVersions) { if (!dockerVersions) {
throw new Exception("Need Docker versions to test. e.g.: `runTests(dockerVersions: 'all')`") throw new Exception("Need Docker versions to test. e.g.: `runTests(dockerVersions: 'all')`")
@ -77,7 +77,6 @@ def docker_versions = get_versions(2)
for (int i = 0; i < docker_versions.length; i++) { for (int i = 0; i < docker_versions.length; i++) {
def dockerVersion = docker_versions[i] def dockerVersion = docker_versions[i]
testMatrix["${dockerVersion}_py27"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py27"]) testMatrix["${dockerVersion}_py27"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py27"])
testMatrix["${dockerVersion}_py36"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py36"])
testMatrix["${dockerVersion}_py37"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py37"]) testMatrix["${dockerVersion}_py37"] = runTests([dockerVersions: dockerVersion, pythonVersions: "py37"])
} }

View File

@ -2,15 +2,15 @@
version: '{branch}-{build}' version: '{branch}-{build}'
install: install:
- "SET PATH=C:\\Python36-x64;C:\\Python36-x64\\Scripts;%PATH%" - "SET PATH=C:\\Python37-x64;C:\\Python37-x64\\Scripts;%PATH%"
- "python --version" - "python --version"
- "pip install tox==2.9.1 virtualenv==15.1.0" - "pip install tox==2.9.1 virtualenv==16.2.0"
# Build the binary after tests # Build the binary after tests
build: false build: false
test_script: test_script:
- "tox -e py27,py36,py37 -- tests/unit" - "tox -e py27,py37 -- tests/unit"
- ps: ".\\script\\build\\windows.ps1" - ps: ".\\script\\build\\windows.ps1"
artifacts: artifacts:

View File

@ -1 +1 @@
pyinstaller==3.3.1 pyinstaller==3.4

View File

@ -3,7 +3,7 @@
set -ex set -ex
TARGET=dist/docker-compose-$(uname -s)-$(uname -m) TARGET=dist/docker-compose-$(uname -s)-$(uname -m)
VENV=/code/.tox/py36 VENV=/code/.tox/py37
mkdir -p `pwd`/dist mkdir -p `pwd`/dist
chmod 777 `pwd`/dist chmod 777 `pwd`/dist

View File

@ -6,17 +6,17 @@
# #
# http://git-scm.com/download/win # http://git-scm.com/download/win
# #
# 2. Install Python 3.6.4: # 2. Install Python 3.7.2:
# #
# https://www.python.org/downloads/ # https://www.python.org/downloads/
# #
# 3. Append ";C:\Python36;C:\Python36\Scripts" to the "Path" environment variable: # 3. Append ";C:\Python37;C:\Python37\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 # https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx?mfr=true
# #
# 4. In Powershell, run the following commands: # 4. In Powershell, run the following commands:
# #
# $ pip install 'virtualenv>=15.1.0' # $ pip install 'virtualenv==16.2.0'
# $ Set-ExecutionPolicy -Scope CurrentUser RemoteSigned # $ Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
# #
# 5. Clone the repository: # 5. Clone the repository:

View File

@ -17,9 +17,9 @@ OPENSSL_VERSION=1.1.1a
OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz OPENSSL_URL=https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
OPENSSL_SHA1=8fae27b4f34445a5500c9dc50ae66b4d6472ce29 OPENSSL_SHA1=8fae27b4f34445a5500c9dc50ae66b4d6472ce29
PYTHON_VERSION=3.6.8 PYTHON_VERSION=3.7.2
PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz PYTHON_URL=https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
PYTHON_SHA1=09fcc4edaef0915b4dedbfb462f1cd15f82d3a6f PYTHON_SHA1=0cd8e52d8ed1d0be12ac8e87a623a15df3a3b418
# #
# Install prerequisites. # Install prerequisites.
@ -36,7 +36,7 @@ if ! [ -x "$(command -v python3)" ]; then
brew install python3 brew install python3
fi fi
if ! [ -x "$(command -v virtualenv)" ]; then if ! [ -x "$(command -v virtualenv)" ]; then
pip install virtualenv pip install virtualenv==16.2.0
fi fi
# #
@ -50,7 +50,7 @@ mkdir -p ${TOOLCHAIN_PATH}
# #
# Set macOS SDK. # Set macOS SDK.
# #
if [ ${SDK_FETCH} ]; then if [[ ${SDK_FETCH} && ! -f ${TOOLCHAIN_PATH}/MacOSX${DEPLOYMENT_TARGET}.sdk/SDKSettings.plist ]]; then
SDK_PATH=${TOOLCHAIN_PATH}/MacOSX${DEPLOYMENT_TARGET}.sdk SDK_PATH=${TOOLCHAIN_PATH}/MacOSX${DEPLOYMENT_TARGET}.sdk
fetch_tarball ${SDK_URL} ${SDK_PATH} ${SDK_SHA1} fetch_tarball ${SDK_URL} ${SDK_PATH} ${SDK_SHA1}
else else
@ -61,7 +61,7 @@ fi
# Build OpenSSL. # Build OpenSSL.
# #
OPENSSL_SRC_PATH=${TOOLCHAIN_PATH}/openssl-${OPENSSL_VERSION} OPENSSL_SRC_PATH=${TOOLCHAIN_PATH}/openssl-${OPENSSL_VERSION}
if ! [ -f ${TOOLCHAIN_PATH}/bin/openssl ]; then if ! [[ $(${TOOLCHAIN_PATH}/bin/openssl version) == *"${OPENSSL_VERSION}"* ]]; then
rm -rf ${OPENSSL_SRC_PATH} rm -rf ${OPENSSL_SRC_PATH}
fetch_tarball ${OPENSSL_URL} ${OPENSSL_SRC_PATH} ${OPENSSL_SHA1} fetch_tarball ${OPENSSL_URL} ${OPENSSL_SRC_PATH} ${OPENSSL_SHA1}
( (
@ -77,7 +77,7 @@ fi
# Build Python. # Build Python.
# #
PYTHON_SRC_PATH=${TOOLCHAIN_PATH}/Python-${PYTHON_VERSION} PYTHON_SRC_PATH=${TOOLCHAIN_PATH}/Python-${PYTHON_VERSION}
if ! [ -f ${TOOLCHAIN_PATH}/bin/python3 ]; then if ! [[ $(${TOOLCHAIN_PATH}/bin/python3 --version) == *"${PYTHON_VERSION}"* ]]; then
rm -rf ${PYTHON_SRC_PATH} rm -rf ${PYTHON_SRC_PATH}
fetch_tarball ${PYTHON_URL} ${PYTHON_SRC_PATH} ${PYTHON_SHA1} fetch_tarball ${PYTHON_URL} ${PYTHON_SRC_PATH} ${PYTHON_SHA1}
( (
@ -87,9 +87,10 @@ if ! [ -f ${TOOLCHAIN_PATH}/bin/python3 ]; then
--datarootdir=${TOOLCHAIN_PATH}/share \ --datarootdir=${TOOLCHAIN_PATH}/share \
--datadir=${TOOLCHAIN_PATH}/share \ --datadir=${TOOLCHAIN_PATH}/share \
--enable-framework=${TOOLCHAIN_PATH}/Frameworks \ --enable-framework=${TOOLCHAIN_PATH}/Frameworks \
--with-openssl=${TOOLCHAIN_PATH} \
MACOSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET} \ MACOSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET} \
CFLAGS="-isysroot ${SDK_PATH} -I${TOOLCHAIN_PATH}/include" \ CFLAGS="-isysroot ${SDK_PATH} -I${TOOLCHAIN_PATH}/include" \
CPPFLAGS="-I${SDK_PATH}/usr/include -I${TOOLCHAIN_PATH}include" \ CPPFLAGS="-I${SDK_PATH}/usr/include -I${TOOLCHAIN_PATH}/include" \
LDFLAGS="-isysroot ${SDK_PATH} -L ${TOOLCHAIN_PATH}/lib" LDFLAGS="-isysroot ${SDK_PATH} -L ${TOOLCHAIN_PATH}/lib"
make -j 4 make -j 4
make install PYTHONAPPSDIR=${TOOLCHAIN_PATH} make install PYTHONAPPSDIR=${TOOLCHAIN_PATH}
@ -97,6 +98,11 @@ if ! [ -f ${TOOLCHAIN_PATH}/bin/python3 ]; then
) )
fi fi
#
# Smoke test built Python.
#
openssl_version ${TOOLCHAIN_PATH}
echo "" echo ""
echo "*** Targeting macOS: ${DEPLOYMENT_TARGET}" echo "*** Targeting macOS: ${DEPLOYMENT_TARGET}"
echo "*** Using SDK ${SDK_PATH}" echo "*** Using SDK ${SDK_PATH}"

View File

@ -24,7 +24,7 @@ fi
BUILD_NUMBER=${BUILD_NUMBER-$USER} BUILD_NUMBER=${BUILD_NUMBER-$USER}
PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py27,py36} PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py27,py37}
for version in $DOCKER_VERSIONS; do for version in $DOCKER_VERSIONS; do
>&2 echo "Running tests against Docker $version" >&2 echo "Running tests against Docker $version"

View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py27,py36,py37,pre-commit envlist = py27,py37,pre-commit
[testenv] [testenv]
usedevelop=True usedevelop=True