Skip to content

Commit a7a257e

Browse files
authored
Merge pull request heroku#880 from heroku/python-versions/py2-base
SQLITE: Py2 base formula update
2 parents 40e91a9 + f03b7ed commit a7a257e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Master
44

55
- Sqlite fix:
6-
- Update Python3 base formula
6+
- Update Python3 and Python2 base formula
77
- Update Python formulas 3.6.x, 3.7.x, 3.5.x
88
- Test staged binaries on Travis
99

builds/runtimes/python2

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ python_version=${BASE^} # this gives us only the filename with version number
1212
version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X
1313
dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz
1414

15-
# shellcheck source=bin/utils
16-
source "$BIN_DIR/steps/sqlite3"
17-
18-
sqlite3_version
19-
echo "Setting up SQLite3 Headers for $SQLITE3_VERSION"
20-
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
21-
22-
echo "Building Python 3..."
15+
echo "Building ${python_version}..."
2316
echo "Pulling from source: ${dep_url}"
2417

2518
curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}"
@@ -33,3 +26,8 @@ make install
3326
# Remove unneeded test directories, similar to the official Docker Python images:
3427
# https://github.com/docker-library/python
3528
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +
29+
30+
# Create links to SQLITE headers so Python can call them at runtime
31+
mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu
32+
cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include
33+
ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so

0 commit comments

Comments
 (0)