Skip to content

Commit a41fd78

Browse files
authored
Merge pull request #840 from heroku/remove-get-pip
Move get-pip utility to s3
2 parents b8d1035 + 5632238 commit a41fd78

File tree

3 files changed

+14
-22378
lines changed

3 files changed

+14
-22378
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These targets are not files
22
.PHONY: tests
33

4-
test: test-heroku-18 test-heroku-16
4+
test: test-heroku-18 test-heroku-16 test-cedar-14
55

66
check:
77
@shellcheck -x bin/compile bin/detect bin/release bin/test-compile bin/utils bin/warnings bin/default_pythons
@@ -10,17 +10,17 @@ check:
1010

1111
test-cedar-14:
1212
@echo "Running tests in docker (cedar-14)..."
13-
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=cedar-14" heroku/cedar-14 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
13+
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=cedar-14" heroku/cedar:14 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run-deps; test/run-features; test/run-versions;'
1414
@echo ""
1515

1616
test-heroku-16:
1717
@echo "Running tests in docker (heroku-16)..."
18-
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
18+
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run-deps; test/run-features; test/run-versions;'
1919
@echo ""
2020

2121
test-heroku-18:
2222
@echo "Running tests in docker (heroku-18)..."
23-
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-18" heroku/heroku:18-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
23+
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-18" heroku/heroku:18-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run-deps; test/run-features; test/run-versions;'
2424
@echo ""
2525

2626
buildenv-heroku-16:

bin/steps/python

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ if [ ! "$SKIP_INSTALL" ]; then
9797
hash -r
9898
fi
9999

100+
# Heroku uses the get-pip utility maintained by the Python community to vendor Pip.
101+
# https://github.com/pypa/get-pip
102+
GETPIP="https://lang-python.s3.amazonaws.com/etc/get-pip.py"
103+
104+
if ! curl "${GETPIP}" -o "$ROOT_DIR/get-pip.py"; then
105+
mcount "failure.python.get-pip"
106+
echo "Failed to pull down get-pip"
107+
exit 1
108+
fi
100109

101110
# If Pip isn't up to date:
102111
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
@@ -107,7 +116,7 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
107116
rm -fr /app/.heroku/python/lib/python*/site-packages/pip-*
108117
rm -fr /app/.heroku/python/lib/python*/site-packages/setuptools-*
109118

110-
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
119+
/app/.heroku/python/bin/python "$ROOT_DIR/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
111120
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
112121
fi
113122

0 commit comments

Comments
 (0)