diff --git a/.travis.yml b/.travis.yml index 3af7f48..248ac25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,9 @@ +dist: xenial language: python python: - "2.7" - - "3.3" - - "3.4" - - "3.5" - "3.6" + - "3.7" # command to install dependencies install: - "pip install nose" diff --git a/lambda_packages/__init__.py b/lambda_packages/__init__.py index 525d2c2..bc3ece1 100644 --- a/lambda_packages/__init__.py +++ b/lambda_packages/__init__.py @@ -18,12 +18,16 @@ }, 'cryptography': { 'python2.7': { - 'version': '2.3.1', - 'path': os.path.join(PACKAGES_DIR, 'cryptography', 'python2.7-cryptography-2.3.1.tar.gz') + 'version': '2.6.1', + 'path': os.path.join(PACKAGES_DIR, 'cryptography', 'python2.7-cryptography-2.6.1.tar.gz') }, 'python3.6': { - 'version': '2.3.1', - 'path': os.path.join(PACKAGES_DIR, 'cryptography', 'python3.6-cryptography-2.3.1.tar.gz') + 'version': '2.6.1', + 'path': os.path.join(PACKAGES_DIR, 'cryptography', 'python3.6-cryptography-2.6.1.tar.gz') + }, + 'python3.7': { + 'version': '2.6.1', + 'path': os.path.join(PACKAGES_DIR, 'cryptography', 'python3.7-cryptography-2.6.1.tar.gz') } }, 'cv2': { diff --git a/lambda_packages/cryptography/README.md b/lambda_packages/cryptography/README.md index 0e39c6d..2bd561f 100644 --- a/lambda_packages/cryptography/README.md +++ b/lambda_packages/cryptography/README.md @@ -2,11 +2,12 @@ On an machine with Amazon Linux: -`./build.sh cryptography 2.3.1` +`./build.sh cryptography ` On a machine with docker and access to lambci images: ``` -docker run --rm -v `pwd`:/app lambci/lambda:build-python2.7 bash -c "cd /app && /app/build.sh --docker --py2-only cryptography 2.3.1" -docker run --rm -v `pwd`:/app lambci/lambda:build-python3.6 bash -c "cd /app && /app/build.sh --docker --py3-only cryptography 2.3.1" +docker run --rm -v `pwd`:/app lambci/lambda:build-python2.7 bash -c "cd /app && /app/build.sh --docker --py2.7-only cryptography " +docker run --rm -v `pwd`:/app lambci/lambda:build-python3.6 bash -c "cd /app && /app/build.sh --docker --py3.6-only cryptography " +docker run --rm -v `pwd`:/app lambci/lambda:build-python3.7 bash -c "cd /app && /app/build.sh --docker --py3.7-only cryptography " ``` diff --git a/lambda_packages/cryptography/build.sh b/lambda_packages/cryptography/build.sh index 27e15c2..aaa369d 100755 --- a/lambda_packages/cryptography/build.sh +++ b/lambda_packages/cryptography/build.sh @@ -8,14 +8,15 @@ # with --docker (you need docker installed and network access to reach lambci's # docker-lambda image). # -# Defaults to building both python2.7 and python3.6 packages. If you only want -# one of them use either --py2-only or --py3-only. +# Defaults to building python2.7, python3.6 and python 3.7 packages. If you only want +# one of them use --py2.7-only or --py3.6-only or --py3.7-only. # set -e DOCKER=0 -PY2=1 -PY3=1 +PY27=1 +PY36=1 +PY37=1 SUDO=sudo while [[ $# -gt 2 ]] @@ -28,14 +29,22 @@ case $key in SUDO="" shift ;; - --py2-only) - PY2=1 - PY3=0 + --py2.7-only) + PY27=1 + PY36=0 + PY37=0 shift ;; - --py3-only) - PY2=0 - PY3=1 + --py3.6-only) + PY27=0 + PY36=1 + PY37=0 + shift + ;; + --py3.7-only) + PY27=0 + PY36=0 + PY37=1 shift ;; *) @@ -48,8 +57,9 @@ PACKAGE=${1} VERSION=${2} echo DOCKER = "${DOCKER}" -echo PY2 = "${PY2}" -echo PY3 = "${PY3}" +echo PY27 = "${PY27}" +echo PY36 = "${PY36}" +echo PY37 = "${PY37}" echo PACKAGE = "${PACKAGE}" echo VERSION = "${VERSION}" @@ -73,6 +83,8 @@ function build_package { if [ "${VIRTUALENV}" == "virtualenv" ]; then ${SUDO} ${PIP} install virtualenv fi + + echo `${PYTHON} --version` echo "make virtualenv" ENV="env-${PYTHON}-${PACKAGE}-${VERSION}" @@ -98,10 +110,14 @@ function build_package { rm -r ${TMP_DIR} } -if [ ${PY2} == 1 ]; then +if [ ${PY27} == 1 ]; then build_package ${PACKAGE} ${VERSION} python2.7 pip virtualenv fi -if [ ${PY3} == 1 ]; then +if [ ${PY36} == 1 ]; then build_package ${PACKAGE} ${VERSION} python3.6 pip3.6 "python3.6 -m venv " fi + +if [ ${PY37} == 1 ]; then + build_package ${PACKAGE} ${VERSION} python3.7 pip3.7 "python3.7 -m venv " +fi diff --git a/lambda_packages/cryptography/python2.7-cryptography-2.3.1.tar.gz b/lambda_packages/cryptography/python2.7-cryptography-2.3.1.tar.gz deleted file mode 100644 index 7e72b26..0000000 Binary files a/lambda_packages/cryptography/python2.7-cryptography-2.3.1.tar.gz and /dev/null differ diff --git a/lambda_packages/cryptography/python2.7-cryptography-2.6.1.tar.gz b/lambda_packages/cryptography/python2.7-cryptography-2.6.1.tar.gz new file mode 100644 index 0000000..4bba060 Binary files /dev/null and b/lambda_packages/cryptography/python2.7-cryptography-2.6.1.tar.gz differ diff --git a/lambda_packages/cryptography/python3.6-cryptography-2.3.1.tar.gz b/lambda_packages/cryptography/python3.6-cryptography-2.3.1.tar.gz deleted file mode 100644 index e8b5667..0000000 Binary files a/lambda_packages/cryptography/python3.6-cryptography-2.3.1.tar.gz and /dev/null differ diff --git a/lambda_packages/cryptography/python3.6-cryptography-2.6.1.tar.gz b/lambda_packages/cryptography/python3.6-cryptography-2.6.1.tar.gz new file mode 100644 index 0000000..0b05b63 Binary files /dev/null and b/lambda_packages/cryptography/python3.6-cryptography-2.6.1.tar.gz differ diff --git a/lambda_packages/cryptography/python3.7-cryptography-2.6.1.tar.gz b/lambda_packages/cryptography/python3.7-cryptography-2.6.1.tar.gz new file mode 100644 index 0000000..eb825a6 Binary files /dev/null and b/lambda_packages/cryptography/python3.7-cryptography-2.6.1.tar.gz differ