Skip to content

Commit 63e84ac

Browse files
authored
Merge pull request #760 from heroku/add-airflow-110-support
Add Apache Airflow 1.10 Support
2 parents d3180d3 + eee8dd9 commit 63e84ac

File tree

5 files changed

+42
-3
lines changed

5 files changed

+42
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Python Buildpack Changelog
22

3-
# 139
3+
# 140 (2018-10-09)
4+
5+
Add support for detecting SLUGIFY_USES_TEXT_UNIDECODE, which is required to
6+
install Apache Airflow version 1.10 or higher.
7+
8+
# 139 (2018-10-08)
49

510
Improvements to Python install messaging
611

bin/steps/pip-install

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,24 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
88
# Install dependencies with Pip.
99
puts-step "Installing requirements with pip"
1010

11-
# Set PIP_EXTRA_INDEX_URL
11+
# Set Pip env vars
12+
# This reads certain environment variables set on the Heroku app config
13+
# and makes them accessible to the pip install process.
14+
#
15+
# PIP_EXTRA_INDEX_URL allows for an alternate pypi URL to be used.
1216
if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then
1317
PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
1418
export PIP_EXTRA_INDEX_URL
19+
mcount "buildvar.PIP_EXTRA_INDEX_URL"
20+
fi
21+
22+
set +e
23+
24+
# Set SLUGIFY_USES_TEXT_UNIDECODE, required for Airflow versions >=1.10
25+
if [[ -r $ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE ]]; then
26+
SLUGIFY_USES_TEXT_UNIDECODE="$(cat "$ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE")"
27+
export SLUGIFY_USES_TEXT_UNIDECODE
28+
mcount "buildvar.SLUGIFY_USES_TEXT_UNIDECODE"
1529
fi
1630

1731
set +e

bin/steps/pipenv

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,22 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then
3535
# Skip pip install, later.
3636
export SKIP_PIP_INSTALL=1
3737

38-
# Set PIP_EXTRA_INDEX_URL
38+
# Set Pip env vars
39+
# This reads certain environment variables set on the Heroku app config
40+
# and makes them accessible to the pip install process.
41+
#
42+
# PIP_EXTRA_INDEX_URL allows for an alternate pypi URL to be used.
3943
if [[ -r $ENV_DIR/PIP_EXTRA_INDEX_URL ]]; then
4044
PIP_EXTRA_INDEX_URL="$(cat "$ENV_DIR/PIP_EXTRA_INDEX_URL")"
4145
export PIP_EXTRA_INDEX_URL
46+
mcount "buildvar.PIP_EXTRA_INDEX_URL"
47+
fi
48+
49+
# Set SLUGIFY_USES_TEXT_UNIDECODE, required for Airflow versions >=1.10
50+
if [[ -r $ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE ]]; then
51+
SLUGIFY_USES_TEXT_UNIDECODE="$(cat "$ENV_DIR/SLUGIFY_USES_TEXT_UNIDECODE")"
52+
export SLUGIFY_USES_TEXT_UNIDECODE
53+
mcount "buildvar.SLUGIFY_USES_TEXT_UNIDECODE"
4254
fi
4355

4456
export PIPENV_VERSION="2018.5.18"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
apache-airflow==1.10

test/run

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
testAirflow() {
4+
export SLUGIFY_USES_TEXT_UNIDECODE="yes"
5+
compile "airflow"
6+
assertCaptured "apache-airflow==1.10"
7+
assertCapturedSuccess
8+
}
9+
310
testPipenv() {
411
compile "pipenv"
512
assertCapturedSuccess

0 commit comments

Comments
 (0)