Merge pull request #870 from heroku/py3-formula-update

SQLITE: Py3 formula update
This commit is contained in:
Casey
2019-10-29 15:59:32 -07:00
committed by GitHub
5 changed files with 10 additions and 14 deletions
+2
View File
@@ -2,6 +2,8 @@
# Master
- Sqlite fix:
- Update Python3 base formula
- Test staged binaries on Travis
--------------------------------------------------------------------------------
+1 -1
View File
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
DEBIAN_FRONTEND=noninteractive \
STACK="cedar-14"
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python-pip libsqlite3-dev realpath && rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt
+1 -1
View File
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
DEBIAN_FRONTEND=noninteractive \
STACK="heroku-16"
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python-pip libsqlite3-dev && rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/
RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt
+1 -1
View File
@@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \
DEBIAN_FRONTEND=noninteractive \
STACK="heroku-18"
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/*
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/*
COPY requirements.txt /app/
RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt
+5 -11
View File
@@ -16,17 +16,6 @@ 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 "Pulling from source: ${dep_url}"
curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}"
mv "${OUT_PREFIX}/${python_version}" src
cd src
@@ -42,4 +31,9 @@ find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -
# Remove spare /
LOCATION=${OUT_PREFIX%?}
# 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
ln $LOCATION/bin/python3 $LOCATION/bin/python