diff --git a/CHANGELOG.md b/CHANGELOG.md index 3301ea3b7538450e683111ca8253b4cf2dcacc7a..88e1610b367e42a43b11721b36edf3dd8df7f625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Python Buildpack Changelog +# 119 + +Improvements to Pipenv support, warning on unsupported Python versions. + +- We now warn when a user is not using latest 2.x or 3.x Python. +- Heroku now supports `[requires]` `python_full_version` in addition to `python_version`. + +# 118 + +Improvements to Pipenv support. + # 117 Bug fix. diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000000000000000000000000000000000000..061134c9980a7b927a069f68d0d3550d861d598f --- /dev/null +++ b/Pipfile @@ -0,0 +1,9 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true +name = "pypi" + +[dev-packages] + +[packages] +"bob-builder" = "==0.0.13" \ No newline at end of file diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000000000000000000000000000000000000..b3d436d813b662067a8d308744e392889ec9a4a6 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,52 @@ +{ + "_meta": { + "hash": { + "sha256": "36d17c46a8b1b844b3cae475f6f42d6c0a9e59b2a9685cbcdc0985656a7a129f" + }, + "host-environment-markers": { + "implementation_name": "cpython", + "implementation_version": "3.6.2", + "os_name": "posix", + "platform_machine": "x86_64", + "platform_python_implementation": "CPython", + "platform_release": "16.7.0", + "platform_system": "Darwin", + "platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64", + "python_full_version": "3.6.2", + "python_version": "3.6", + "sys_platform": "darwin" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "bob-builder": { + "hashes": [ + "sha256:b4de49a8e436fcaf82236ea43f78413b4a4c92100726e382ab57b6bdfb38fe64", + "sha256:288e3e765c4890fe9a63ae52ac6b4a963c13fe508482c70ff701a5ae21b9a673" + ], + "version": "==0.0.13" + }, + "boto": { + "hashes": [ + "sha256:13be844158d1bd80a94c972c806ec8381b9ea72035aa06123c5db6bc6a6f3ead", + "sha256:deb8925b734b109679e3de65856018996338758f4b916ff4fe7bb62b6d7000d1" + ], + "version": "==2.48.0" + }, + "docopt": { + "hashes": [ + "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" + ], + "version": "==0.6.2" + } + }, + "develop": {} +} diff --git a/README.md b/README.md index b35a0a9540d345cb7f3f3403a04b841165feba33..4e1bb6fc9cc60a9558df9b5f6f9f1079887f0559 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ Deploying a Python application couldn't be easier: $ heroku create --buildpack heroku/python $ git push heroku master - ... + … -----> Python app detected -----> Installing python-3.6.2 -----> Installing pip - -----> Installing requirements with latest pipenv... + -----> Installing requirements with latest pipenv… ... - Installing dependencies from Pipfile... + Installing dependencies from Pipfile… -----> Discovering process types Procfile declares types -> (none) @@ -44,11 +44,21 @@ Specify a Python Runtime Specific versions of the Python runtime can be specified with a `runtime.txt` file: $ cat runtime.txt - python-2.7.13 + python-2.7.14 + +Or, with a `Pipfile.lock` (generated from the following `Pipfile`): + + [requires] + python_version = "2.7" + +Or, more specifically: + + [requires] + python_full_version = "2.7.14" Runtime options include: - `python-3.6.2` -- `python-2.7.13` +- `python-2.7.14` - `pypy-5.7.1` (unsupported, experimental) - `pypy3-5.5.1` (unsupported, experimental) diff --git a/bin/compile b/bin/compile index c2885214d3a622fcb8e1974bf5c78398cc012489..4b7682d4d2588177f4b3452ee6ef3676b4a6685b 100755 --- a/bin/compile +++ b/bin/compile @@ -35,10 +35,13 @@ export BUILD_DIR CACHE_DIR ENV_DIR # Python defaults DEFAULT_PYTHON_VERSION="python-3.6.2" +LATEST_3="python-3.6.2" +LATEST_2="python-2.7.14" + DEFAULT_PYTHON_STACK="cedar-14" PIP_UPDATE="9.0.1" -export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE +export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_3 # Common Problem Warnings WARNINGS_LOG=$(mktemp) diff --git a/bin/steps/nltk b/bin/steps/nltk index b2ded51249840e55f2978e1bda6fe1113d09a6ed..a930a72fa32dd74392703da0c9b5917daedd2d92 100755 --- a/bin/steps/nltk +++ b/bin/steps/nltk @@ -15,7 +15,7 @@ source "$BIN_DIR/utils" # Check that nltk was installed by pip, otherwise obviously not needed if sp-grep -s nltk; then - puts-step "Downloading NLTK corpora..." + puts-step "Downloading NLTK corpora…" nltk_packages_definition="$BUILD_DIR/nltk.txt" diff --git a/bin/steps/pipenv b/bin/steps/pipenv index ad7c78edcdce3f13b025dffbfe32dedfbbbfdbfc..927183b419da85742945e469780acc8297c20f51 100644 --- a/bin/steps/pipenv +++ b/bin/steps/pipenv @@ -1,9 +1,12 @@ #!/usr/bin/env bash +# export CLINT_FORCE_COLOR=1 +# export PIPENV_FORCE_COLOR=1 + # Pipenv support (Generate requriements.txt with pipenv). if [[ -f Pipfile ]]; then if [[ ! -f requirements.txt ]]; then - puts-step "Installing requirements with latest Pipenv..." + puts-step "Installing requirements with latest Pipenv…" # Install pipenv. /app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null diff --git a/bin/steps/pipenv-python-version b/bin/steps/pipenv-python-version index 23aa12a35532b487a229fec1266dd1c0665b010d..361668f2f1df9aa5b414c23cacff75eee1ff0c55 100755 --- a/bin/steps/pipenv-python-version +++ b/bin/steps/pipenv-python-version @@ -6,19 +6,27 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then if [[ ! -f $BUILD_DIR/runtime.txt ]]; then if [[ ! -f $BUILD_DIR/Pipfile.lock ]]; then - puts-warn "No 'pipfile.lock' found! We recommend you commit this into your repository." + puts-warn "No 'Pipfile.lock' found! We recommend you commit this into your repository." fi if [[ -f $BUILD_DIR/Pipfile.lock ]]; then set +e - PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock") + PYTHON=$(jq -r '._meta.requires.python_full_version' "$BUILD_DIR/Pipfile.lock") + if [[ "$PYTHON" != "null" ]]; then + echo "python-$PYTHON" > "$BUILD_DIR/runtime.txt" + fi set -e - if [ "$PYTHON" = 2.7 ]; then - echo "python-2.7.13" > "$BUILD_DIR/runtime.txt" - fi - if [ "$PYTHON" = 3.6 ]; then - echo "python-3.6.2" > "$BUILD_DIR/runtime.txt" + if [[ "$PYTHON" == "null" ]]; then + PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock") + if [ "$PYTHON" = 2.7 ]; then + echo "python-2.7.14" > "$BUILD_DIR/runtime.txt" + fi + if [ "$PYTHON" = 3.6 ]; then + echo "python-3.6.2" > "$BUILD_DIR/runtime.txt" + fi fi + + fi fi fi diff --git a/bin/steps/python b/bin/steps/python index 908d1b27d7ae5ce4ed70f429f3e6589f959f9ae7..798d4b19ccf355d76e7bacb481861d0302cfe284 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -4,6 +4,21 @@ set +e runtime-fixer runtime.txt PYTHON_VERSION=$(cat runtime.txt) +if [[ $PYTHON_VERSION =~ ^python-2 ]]; then + if [[ "$PYTHON_VERSION" != "$LATEST_2" ]]; then + puts-warn "The latest version of Python 2 is $LATEST_2 (you are using $PYTHON_VERSION, which is unsupported)." + puts-warn "We recommend upgrading by specifying the latest version ($LATEST_2)." + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi +else + if [[ "$PYTHON_VERSION" != "$LATEST_3" ]]; then + puts-warn "The latest version of Python 3 is $LATEST_3 (you are using $PYTHON_VERSION, which is unsupported)." + puts-warn "We recommend upgrading by specifying the latest version ($LATEST_3)." + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi + +fi + if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then puts-step "Stack has changed from $CACHED_PYTHON_STACK to $STACK, clearing cache" rm -fr .heroku/python-stack .heroku/python-version .heroku/python .heroku/vendor diff --git a/builds/libraries/sqlite b/builds/libraries/sqlite index 8ed1720d87c4ec3b37d9a60db18de3fbfa7fe506..e24484ed32bee7476d163f997cdbd2303fc14207 100755 --- a/builds/libraries/sqlite +++ b/builds/libraries/sqlite @@ -3,7 +3,7 @@ OUT_PREFIX=$1 -echo "Building SQLite..." +echo "Building SQLite…" SOURCE_TARBALL='https://www.sqlite.org/sqlite-autoconf-3070900.tar.gz' diff --git a/builds/libraries/vendor/gdal b/builds/libraries/vendor/gdal index 21b331a5f392f291b397af1a3ecb97e1e3c1adfd..7cb110ea85c7d6cb93239c1599291ede6f420b2d 100755 --- a/builds/libraries/vendor/gdal +++ b/builds/libraries/vendor/gdal @@ -8,7 +8,7 @@ export PATH="/app/.heroku/python/bin/:$PATH" hash -r -echo "Building gdal..." +echo "Building gdal…" VERSION="2.2.1" SOURCE_TARBALL="http://download.osgeo.org/gdal/${VERSION}/gdal-${VERSION}.tar.gz" diff --git a/builds/libraries/vendor/geos b/builds/libraries/vendor/geos index 69966b1c99daa2539796d099d28201c0c62dda3f..3c7bcab273a6c36cfbd97bb07805b979adc71a2b 100755 --- a/builds/libraries/vendor/geos +++ b/builds/libraries/vendor/geos @@ -8,7 +8,7 @@ export PATH="/app/.heroku/python/bin/:$PATH" hash -r -echo "Building geos..." +echo "Building geos…" VERSION=3.6.2 diff --git a/builds/libraries/vendor/libffi b/builds/libraries/vendor/libffi index bfe7e38a8b89dfcd4b772b0cbc0a8315ce740683..5955371b94044c508a87cee07ace6a7bd9a21a9b 100755 --- a/builds/libraries/vendor/libffi +++ b/builds/libraries/vendor/libffi @@ -13,7 +13,7 @@ export PATH="/app/.heroku/python/bin/:$PATH" hash -r -echo "Building libffi..." +echo "Building libffi…" SOURCE_TARBALL='ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz' diff --git a/builds/libraries/vendor/libmemcache b/builds/libraries/vendor/libmemcache index 05c31318db3c4dc7e43f860b6d6e6b084bdc2f6d..3d01ce5aeb1ac5eaf38c33c51ceb6628f68bc03e 100755 --- a/builds/libraries/vendor/libmemcache +++ b/builds/libraries/vendor/libmemcache @@ -20,7 +20,7 @@ dep_archive_name=${dep_dirname}.tar.gz dep_url=https://launchpad.net/libmemcached/1.0/${dep_version}/+download/${dep_archive_name} # SASL Support. -echo "-----> Building cyrus-sasl 2.1.26..." +echo "-----> Building cyrus-sasl 2.1.26…" curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz # FTP doesn't play well with piping into tar xz @@ -33,7 +33,7 @@ make -s -j 9 make install -s popd -echo "-----> Building libmemcached ${dep_version}..." +echo "-----> Building libmemcached ${dep_version}…" curl -L ${dep_url} | tar xz pushd ${dep_dirname} diff --git a/builds/libraries/vendor/proj b/builds/libraries/vendor/proj index a22e779b3ec1d861eeed75fdb66c9e59b110fec7..7f11578bb5afaf17842b25b542aa2f25278891d6 100755 --- a/builds/libraries/vendor/proj +++ b/builds/libraries/vendor/proj @@ -8,7 +8,7 @@ export PATH="/app/.heroku/python/bin/:$PATH" hash -r -echo "Building gdal..." +echo "Building gdal…" VERSION=4.9.3 SOURCE_TARBALL="http://download.osgeo.org/proj/proj-${VERSION}.tar.gz" diff --git a/builds/runtimes/pypy-5.3.1 b/builds/runtimes/pypy-5.3.1 index d4fc13b38088e3867ece17a6fb8a3f269abe1646..cc1be00ef0a52d183daa09fa76dde73895aab7a3 100755 --- a/builds/runtimes/pypy-5.3.1 +++ b/builds/runtimes/pypy-5.3.1 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy2-v5.3.1-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy-5.6.0 b/builds/runtimes/pypy-5.6.0 index 2aee7539e2148cfdb5da70e809ee438bc54672a3..685fa1da3488c079c8fbe933e715033d38e06c23 100755 --- a/builds/runtimes/pypy-5.6.0 +++ b/builds/runtimes/pypy-5.6.0 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.6.0-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy2-v5.6.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy-5.7.0 b/builds/runtimes/pypy-5.7.0 index de074edf12f4a353566cd50d855bf3a8bacffa4a..c16d5e36139150471d9fe648cb6ed41409d1afbd 100755 --- a/builds/runtimes/pypy-5.7.0 +++ b/builds/runtimes/pypy-5.7.0 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.7.0-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy2-v5.7.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy-5.7.1 b/builds/runtimes/pypy-5.7.1 index ee93ba1f2d5af909813d1f4aac8595d5a2793d0d..86e34c6abe20fd97302aef2829e87a0c2e67561a 100755 --- a/builds/runtimes/pypy-5.7.1 +++ b/builds/runtimes/pypy-5.7.1 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.7.1-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy2-v5.7.1-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy-5.8.0 b/builds/runtimes/pypy-5.8.0 index 1e06e711733a2a4bdaaf5f65c2f3e24c74da0857..6e8b6ac3bc9a9b1e972933ce1717356d8b22a44a 100755 --- a/builds/runtimes/pypy-5.8.0 +++ b/builds/runtimes/pypy-5.8.0 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8.0-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy2-v5.8.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy3-2.4.0 b/builds/runtimes/pypy3-2.4.0 index ca010199c5cff98471eedcc8f2110fdce22b398e..61b163819844511ba379e02561d663ae507e8025 100755 --- a/builds/runtimes/pypy3-2.4.0 +++ b/builds/runtimes/pypy3-2.4.0 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy3-2.4.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy3-5.5.0 b/builds/runtimes/pypy3-5.5.0 index 567e96efcfba9d953925fa03b97afe13068bcab1..fde9ffe28cf53d65679e877a3a8f8f41ca86d1b4 100755 --- a/builds/runtimes/pypy3-5.5.0 +++ b/builds/runtimes/pypy3-5.5.0 @@ -6,7 +6,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.5.0-alpha-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy3-v5.5.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy3-5.7.1 b/builds/runtimes/pypy3-5.7.1 index fad7d22211ec62f7db2c0a987439014cf4466e6e..fb0e71802dda8dee321c2ec7692a238bb91ea288 100755 --- a/builds/runtimes/pypy3-5.7.1 +++ b/builds/runtimes/pypy3-5.7.1 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3-v5.7.1-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy3-v5.7.1-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/pypy3-5.8.0 b/builds/runtimes/pypy3-5.8.0 index 87844a561ddec8d6b929e55891fabdbc5d52d4ae..df08b9fc7c91ed64165defe8c8a2f66700956152 100755 --- a/builds/runtimes/pypy3-5.8.0 +++ b/builds/runtimes/pypy3-5.8.0 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building PyPy..." +echo "Building PyPy…" SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3-v5.8.0-linux64.tar.bz2' curl -L $SOURCE_TARBALL | tar jx cp -R pypy3-v5.8.0-linux64/* $OUT_PREFIX diff --git a/builds/runtimes/python-2.7.10 b/builds/runtimes/python-2.7.10 index ba72340f35d1356267d71c229b20a50f090e3589..4ab82dc3e529f2b128ae06acb756a0f54587c496 100755 --- a/builds/runtimes/python-2.7.10 +++ b/builds/runtimes/python-2.7.10 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/2.7.10/Python-2.7.10.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-2.7.10 src diff --git a/builds/runtimes/python-2.7.11 b/builds/runtimes/python-2.7.11 index 4e60fed21befcc10298a602bd6c547c7a2b18316..903a4a29dae663b0d8cb5aee936c0b7b34d93f85 100755 --- a/builds/runtimes/python-2.7.11 +++ b/builds/runtimes/python-2.7.11 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/2.7.11/Python-2.7.11.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-2.7.11 src diff --git a/builds/runtimes/python-2.7.12 b/builds/runtimes/python-2.7.12 index 6c1b38ce1fd0af9b011f8519d7cb9ba785f9e45a..3a721c31af019a4038954ed7587591ccba689af1 100755 --- a/builds/runtimes/python-2.7.12 +++ b/builds/runtimes/python-2.7.12 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/2.7.12/Python-2.7.12.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-2.7.12 src diff --git a/builds/runtimes/python-2.7.13 b/builds/runtimes/python-2.7.13 index 3f34aad6c1015f4837314acb9f236e32a136d22f..4379d2ed7d5b2235ae3869cab8e89a94726dc826 100755 --- a/builds/runtimes/python-2.7.13 +++ b/builds/runtimes/python-2.7.13 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/2.7.13/Python-2.7.13.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-2.7.13 src diff --git a/builds/runtimes/python-2.7.14 b/builds/runtimes/python-2.7.14 new file mode 100755 index 0000000000000000000000000000000000000000..fa16fd5f40c2665c3ec35c832f7fd59fcbc636d0 --- /dev/null +++ b/builds/runtimes/python-2.7.14 @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ +# Build Deps: libraries/sqlite + +OUT_PREFIX=$1 + +echo "Building Python…" +SOURCE_TARBALL='https://python.org/ftp/python/2.7.14/Python-2.7.14.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-2.7.14 src +cd src + +./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --with-ensurepip=no +make +make install + +# Remove unneeded test directories, similar to the official Docker Python images: +# https://github.com/docker-library/python +find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' + diff --git a/builds/runtimes/python-2.7.9 b/builds/runtimes/python-2.7.9 index e94dedeb332d39dcd5ed11a12b1d7ad1938a6388..1ab0085ebfd044127ca1eddad096155100651500 100755 --- a/builds/runtimes/python-2.7.9 +++ b/builds/runtimes/python-2.7.9 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/2.7.9/Python-2.7.9.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-2.7.9 src diff --git a/builds/runtimes/python-3.5.2 b/builds/runtimes/python-3.5.2 index 760293d49eac5ca80de1cabf847ed06ef76dafbb..49806e6488a892575e9067d8a3d2d3deb1012fe2 100755 --- a/builds/runtimes/python-3.5.2 +++ b/builds/runtimes/python-3.5.2 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/3.5.2/Python-3.5.2.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-3.5.2 src diff --git a/builds/runtimes/python-3.5.3 b/builds/runtimes/python-3.5.3 index a6f6ca49cf549d75f697400c6354e32fdd72461b..6e54f88b55195ff4c3de565d53bfc9f8bf26e49b 100755 --- a/builds/runtimes/python-3.5.3 +++ b/builds/runtimes/python-3.5.3 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/3.5.3/Python-3.5.3.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-3.5.3 src diff --git a/builds/runtimes/python-3.6.0 b/builds/runtimes/python-3.6.0 index 2d4208217f87d49f89f3d704f19f1bd1b75d3629..9c31d24fce439720a04338c4db6c6203d82f541b 100755 --- a/builds/runtimes/python-3.6.0 +++ b/builds/runtimes/python-3.6.0 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/3.6.0/Python-3.6.0.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-3.6.0 src diff --git a/builds/runtimes/python-3.6.1 b/builds/runtimes/python-3.6.1 index 2611342cdcb925419ef6c43f485cfb54f71582d5..263fc082a7c8ebd6b73684d4df0ebde57a5bc144 100755 --- a/builds/runtimes/python-3.6.1 +++ b/builds/runtimes/python-3.6.1 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/3.6.1/Python-3.6.1.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-3.6.1 src diff --git a/builds/runtimes/python-3.6.2 b/builds/runtimes/python-3.6.2 index d23d4913c9cbab2717c2a88d6dbc454fc92e853d..9b23a902af0c52c4bce11b2fd9f881bf09b0bb26 100755 --- a/builds/runtimes/python-3.6.2 +++ b/builds/runtimes/python-3.6.2 @@ -4,7 +4,7 @@ OUT_PREFIX=$1 -echo "Building Python..." +echo "Building Python…" SOURCE_TARBALL='https://python.org/ftp/python/3.6.2/Python-3.6.2.tgz' curl -L $SOURCE_TARBALL | tar xz mv Python-3.6.2 src diff --git a/requirements.txt b/requirements.txt index 1d64dbd03b7fe5b30ac3e06c36a61ed0126155e3..35bd16651cfbdf08820a00aff48aa38404248e7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ +docopt==0.6.2 bob-builder==0.0.13 +boto==2.48.0 diff --git a/test/fixtures/pipenv-full-version/Pipfile b/test/fixtures/pipenv-full-version/Pipfile new file mode 100644 index 0000000000000000000000000000000000000000..56194d02e060ebc80c4fae6d6a5b85717cb5ed1a --- /dev/null +++ b/test/fixtures/pipenv-full-version/Pipfile @@ -0,0 +1,9 @@ +[[source]] +url = "https://pypi.python.org/simple" +verify_ssl = true + +[packages] +requests = "*" + +[requires] +python_full_version = "3.6.2" \ No newline at end of file diff --git a/test/fixtures/pipenv-full-version/Pipfile.lock b/test/fixtures/pipenv-full-version/Pipfile.lock new file mode 100644 index 0000000000000000000000000000000000000000..15f40775d714c632441a5f8ce8e0876098618f35 --- /dev/null +++ b/test/fixtures/pipenv-full-version/Pipfile.lock @@ -0,0 +1,23 @@ +{ + "default": { + "requests": { + "version": "==2.13.0", + "hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb" + } + }, + "develop": {}, + "_meta": { + "sources": [ + { + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ], + "requires": { + "python_version": "3.6" + }, + "hash": { + "sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e" + } + } +} \ No newline at end of file diff --git a/test/fixtures/pipenv-lock/Pipfile b/test/fixtures/pipenv-lock/Pipfile new file mode 100644 index 0000000000000000000000000000000000000000..317d2dddd5fd7f1f70bdaeb4035bd5d6850a6bff --- /dev/null +++ b/test/fixtures/pipenv-lock/Pipfile @@ -0,0 +1,2 @@ +[packages] +"delegator.py" = "*" diff --git a/test/fixtures/pipenv-lock/Pipfile.lock b/test/fixtures/pipenv-lock/Pipfile.lock new file mode 100644 index 0000000000000000000000000000000000000000..f5414a8e7a2a408093517f7e3bb894ea78df745b --- /dev/null +++ b/test/fixtures/pipenv-lock/Pipfile.lock @@ -0,0 +1,53 @@ +{ + "_meta": { + "hash": { + "sha256": "397f2c55e3558ea57d292e3fc19b34e483770e5ec02cdedfb1f330680cd26635" + }, + "host-environment-markers": { + "implementation_name": "cpython", + "implementation_version": "3.6.2", + "os_name": "posix", + "platform_machine": "x86_64", + "platform_python_implementation": "CPython", + "platform_release": "16.7.0", + "platform_system": "Darwin", + "platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64", + "python_full_version": "3.6.2", + "python_version": "3.6", + "sys_platform": "darwin" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "delegator.py": { + "hashes": [ + "sha256:2575c4adc923ad0b8fdaa433f862b2b7cf21982717fb23cc895fd8f249ea820c", + "sha256:495e11ada66648650171a6c9a188df4eb050b235abff8771f41ee8a064eb9ded" + ], + "version": "==0.0.13" + }, + "pexpect": { + "hashes": [ + "sha256:f853b52afaf3b064d29854771e2db509ef80392509bde2dd7a6ecf2dfc3f0018", + "sha256:3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92" + ], + "version": "==4.2.1" + }, + "ptyprocess": { + "hashes": [ + "sha256:e8c43b5eee76b2083a9badde89fd1bbce6c8942d1045146e100b7b5e014f4f1a", + "sha256:e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365" + ], + "version": "==0.5.2" + } + }, + "develop": {} +} diff --git a/test/fixtures/python2/runtime.txt b/test/fixtures/python2/runtime.txt index ba85ab9742df213599b929d6e0ac9b4f408f6c28..2ce112e3253c6999f1c58a59742c73ca95178cff 100644 --- a/test/fixtures/python2/runtime.txt +++ b/test/fixtures/python2/runtime.txt @@ -1 +1 @@ -python-2.7.13 \ No newline at end of file +python-2.7.14 \ No newline at end of file diff --git a/test/run b/test/run index faec575523e3041e5213a1618d2dc2813313099f..51db41fccf4f965177b3c24a191bdd22329f7495 100755 --- a/test/run +++ b/test/run @@ -5,12 +5,23 @@ testPipenv() { assertCapturedSuccess } +testPipenvLock() { + compile "pipenv-lock" + assertCapturedSuccess +} + testPipenvVersion() { compile "pipenv-version" assertCaptured "3.6.2" assertCapturedSuccess } +testPipenvFullVersion() { + compile "pipenv-full-version" + assertCaptured "3.6.2" + assertCapturedSuccess +} + testNoRequirements() { compile "no-requirements" assertCapturedError @@ -61,7 +72,7 @@ testPylibmc() { testPython2() { compile "python2" - assertCaptured "python-2.7.13" + assertCaptured "python-2.7.14" assertCapturedSuccess }