Commit 6a12d139 authored by Liu Junxiao's avatar Liu Junxiao

Merge remote-tracking branch 'upstream/master'

parents 8247866e af7332b5
......@@ -2,15 +2,15 @@ language: bash
dist: trusty
jobs:
include:
- stage: "Bash linting (shellcheck)"
sudo: false
addons:
apt:
sources:
- debian-sid # Grab shellcheck from the Debian repo (o_O)
packages:
- shellcheck
script: make check
# - stage: "Bash linting (shellcheck)"
# sudo: false
# addons:
# apt:
# sources:
# - debian-sid # Grab shellcheck from the Debian repo (o_O)
# packages:
# - shellcheck
# script: make check
- stage: "Stack Tests"
services: docker
......
# Python Buildpack Changelog
# 134
Default to 3.6.5, bugfixes.
# 133
Fixes for Pip 10 release.
# 132
Improve pip installation, with the release of v9.0.2.
......
......@@ -49,17 +49,17 @@ Specific versions of the Python runtime can be specified in your `Pipfile`:
Or, more specifically:
[requires]
python_full_version = "2.7.14"
python_full_version = "2.7.15"
Or, with a `runtime.txt` file:
$ cat runtime.txt
python-2.7.14
python-2.7.15
Runtime options include:
- `python-3.6.4`
- `python-2.7.14`
- `python-2.7.15`
Customization in China Mainland
......
This diff is collapsed.
......@@ -44,22 +44,20 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL
# Display a warning if collectstatic failed.
[ "$COLLECTSTATIC_STATUS" -ne 0 ] && {
mcount "failure.collectstatic"
if grep -q 'SyntaxError' "$COLLECTSTATIC_LOG"; then
mcount "failure.collectstatic.syntax-error"
fi
if grep -q 'ImproperlyConfigured' "$COLLECTSTATIC_LOG"; then
elif grep -q 'ImproperlyConfigured' "$COLLECTSTATIC_LOG"; then
mcount "failure.collectstatic.improper-configuration"
fi
if grep -q 'The CSS file' "$COLLECTSTATIC_LOG"; then
elif grep -q 'The CSS file' "$COLLECTSTATIC_LOG"; then
mcount "failure.collectstatic.fancy-references"
fi
if grep -q 'OSError' "$COLLECTSTATIC_LOG"; then
elif grep -q 'OSError' "$COLLECTSTATIC_LOG"; then
mcount "failure.collectstatic.missing-file"
else
mcount "failure.collectstatic.other"
fi
echo
......
......@@ -20,9 +20,6 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
mcount "tool.pip"
# Count expected build failures.
if grep -q 'wsgiref' requirements.txt; then
mcount "failure.wsgiref"
fi
if grep -q '==0.0.0' requirements.txt; then
mcount "failure.none-version"
fi
......@@ -35,10 +32,10 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
show-warnings
if [[ ! $PIP_STATUS -eq 0 ]]; then
mcount "failure.pip-install"
exit 1
fi
# Smart Requirements handling
cp requirements.txt .heroku/python/requirements-declared.txt
/app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt
......
......@@ -20,7 +20,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
if [[ -s .heroku/python/requirements-stale.txt ]]; then
puts-step "Uninstalling stale dependencies"
/app/.heroku/python/bin/pip uninstall -r .heroku/python/requirements-stale.txt -y --exists-action=w | cleanup | indent
/app/.heroku/python/bin/pip uninstall -r .heroku/python/requirements-stale.txt -y --exists-action=w --disable-pip-version-check | cleanup | indent
fi
fi
......
......@@ -9,7 +9,7 @@
#
# This script is invoked by [`bin/compile`](/).
if [[ "$STACK" == "heroku-16" ]]; then
if [[ "$STACK" != "cedar-14" ]]; then
# libmemcached is pre-installed in the stack image so there is no need to vendor it.
return 0
fi
......
......@@ -69,7 +69,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
rm -fr /app/.heroku/python/lib/python*/site-packages/pip-*
rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-*
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" &> /dev/null
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
fi
......
[buildpack]
name = "Python"
[publish.Ignore]
files = [
"test/",
".gitignore",
".dockerignore",
".github/",
"Dockerfile",
"Pipfile",
"Pipfile.lock"
]
\ No newline at end of file
#!/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.15/Python-2.7.15.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.15 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 '{}' +
#!/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/3.6.5/Python-3.6.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.6.5 src
cd src
./configure --prefix=$OUT_PREFIX --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 '{}' +
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-e git+https://github.com/requests/requests.git#egg=requests
\ No newline at end of file
python-2.7.14
\ No newline at end of file
python-2.7.15
......@@ -12,7 +12,7 @@ testPipenvLock() {
testPipenvVersion() {
compile "pipenv-version"
assertCaptured "3.6.4"
assertCaptured "3.6.5"
assertCapturedSuccess
}
......@@ -77,13 +77,19 @@ testPylibmc() {
testPython2() {
compile "python2"
assertCaptured "python-2.7.14"
assertCaptured "python-2.7.15"
assertCapturedSuccess
}
testPython3() {
compile "python3"
assertCaptured "python-3.6.4"
assertCaptured "python-3.6.5"
assertCapturedSuccess
}
testGitEgg() {
compile "git-egg"
assertCaptured "requests"
assertCapturedSuccess
}
......
#!/usr/bin/env python
import io
import json
import sys
......@@ -7,7 +8,7 @@ import sys
def main():
INFILE = sys.argv[1]
with open(INFILE, 'rb') as f:
with io.open(INFILE, 'r', encoding='utf-8') as f:
lockfile = json.load(f)
packages = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment