diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index f58e3d5a9..1cf752ed5 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -152,7 +152,7 @@ ARG TARGETARCH # Use a separate container to build wheels to prevent build dependencies in final image RUN apt-get -qq update \ && apt-get -qq install -y \ - apt-transport-https wget \ + apt-transport-https wget unzip \ && apt-get -qq update \ && apt-get -qq install -y \ python3.11 \ diff --git a/docker/main/build_pysqlite3.sh b/docker/main/build_pysqlite3.sh index 6375b33fa..c84c6fcf7 100755 --- a/docker/main/build_pysqlite3.sh +++ b/docker/main/build_pysqlite3.sh @@ -2,18 +2,25 @@ set -euxo pipefail -SQLITE3_VERSION="96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" # 3.46.0 +SQLITE3_VERSION="3.46.1" PYSQLITE3_VERSION="0.5.3" -# Fetch the source code for the latest release of Sqlite. +# Fetch the pre-built sqlite amalgamation instead of building from source if [[ ! -d "sqlite" ]]; then - wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=${SQLITE3_VERSION} -O sqlite.tar.gz - tar xzf sqlite.tar.gz - cd sqlite/ - LIBS="-lm" ./configure --disable-tcl --enable-tempstore=always - make sqlite3.c + mkdir sqlite + cd sqlite + + # Download the pre-built amalgamation from sqlite.org + # For SQLite 3.46.1, the amalgamation version is 3460100 + SQLITE_AMALGAMATION_VERSION="3460100" + + wget https://www.sqlite.org/2024/sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}.zip -O sqlite-amalgamation.zip + unzip sqlite-amalgamation.zip + mv sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION}/* . + rmdir sqlite-amalgamation-${SQLITE_AMALGAMATION_VERSION} + rm sqlite-amalgamation.zip + cd ../ - rm sqlite.tar.gz fi # Grab the pysqlite3 source code.