Skip to content

Commit 86fc9f1

Browse files
authored
Merge pull request #870 from heroku/py3-formula-update
SQLITE: Py3 formula update
2 parents 89885a4 + 1c87fd3 commit 86fc9f1

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Master
44

5+
- Sqlite fix:
6+
- Update Python3 base formula
57
- Test staged binaries on Travis
68

79
--------------------------------------------------------------------------------

builds/cedar-14.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
77
DEBIAN_FRONTEND=noninteractive \
88
STACK="cedar-14"
99

10-
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && apt-get install -y python-pip libsqlite3-dev realpath && rm -rf /var/lib/apt/lists/*
1111

1212
COPY requirements.txt /app/
1313
RUN pip install -r /app/requirements.txt

builds/heroku-16.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
77
DEBIAN_FRONTEND=noninteractive \
88
STACK="heroku-16"
99

10-
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && apt-get install -y python-pip libsqlite3-dev && rm -rf /var/lib/apt/lists/*
1111

1212
COPY requirements.txt /app/
1313
RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt

builds/heroku-18.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
77
DEBIAN_FRONTEND=noninteractive \
88
STACK="heroku-18"
99

10-
RUN apt-get update && apt-get install --no-install-recommends -y python-pip-whl=9.0.1-2 python-pip=9.0.1-2 python-setuptools python-wheel && rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && apt-get install --no-install-recommends -y python-pip-whl=9.0.1-2 python-pip=9.0.1-2 python-setuptools python-wheel libsqlite3-dev && rm -rf /var/lib/apt/lists/*
1111

1212
COPY requirements.txt /app/
1313
RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt

builds/runtimes/python3

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ python_version=${BASE^} # this gives us only the filename with version number
1616
version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X
1717
dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz
1818

19-
# shellcheck source=bin/utils
20-
source "$BIN_DIR/steps/sqlite3"
21-
22-
sqlite3_version
23-
echo "Setting up SQLite3 Headers for $SQLITE3_VERSION"
24-
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
25-
26-
echo "Building Python 3..."
27-
echo "Pulling from source: ${dep_url}"
28-
29-
3019
curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}"
3120
mv "${OUT_PREFIX}/${python_version}" src
3221
cd src
@@ -42,4 +31,9 @@ find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -
4231
# Remove spare /
4332
LOCATION=${OUT_PREFIX%?}
4433

34+
# Create links to SQLITE headers so Python can call them at runtime
35+
mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu
36+
cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include
37+
ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so
38+
4539
ln $LOCATION/bin/python3 $LOCATION/bin/python

0 commit comments

Comments
 (0)