diff --git a/builds/runtimes/python2 b/builds/runtimes/python2 index 5794991..b309254 100644 --- a/builds/runtimes/python2 +++ b/builds/runtimes/python2 @@ -12,14 +12,7 @@ python_version=${BASE^} # this gives us only the filename with version number version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python 3..." +echo "Building ${python_version}..." echo "Pulling from source: ${dep_url}" curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}" @@ -33,3 +26,8 @@ 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 '{}' + + +# Create links to SQLITE headers so Python can call them at runtime +mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu +cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include +ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so