coleifer / pysqlite3

SQLite3 DB-API 2.0 driver from Python 3, packaged separately, with improvements
zlib License
192 stars 53 forks source link

No ARM builds available. #72

Closed illeatmyhat closed 8 months ago

illeatmyhat commented 8 months ago

There are no ARM builds available. This is not difficult to do with github workflows (they have windows, mac, linux runners on x86 and ARM) See an example here: https://github.com/IBM/kstar/blob/main/.github/workflows/main.yaml#L8-L31

In a redhat/ubi9-minimal docker image, I'm attempting to install pysqlite3-binary, but get the error

ERROR: Could not find a version that satisfies the requirement pysqlite3-binary (from versions: none)
ERROR: No matching distribution found for pysqlite3-binary

minimum reproducable example:

docker buildx build --platform=linux/amd64,linux/arm64 -f ./Dockerfile .

# syntax=docker/dockerfile:1
FROM redhat/ubi9-minimal as builder

RUN microdnf update -y && \
    microdnf install -y python3.11-devel python3.11-pip && \
    pip3.11 install --no-cache-dir -U pip && \
    pip3.11 install pysqlite3-binary
illeatmyhat commented 8 months ago

FYI for anyone who just wants to get it built, do this instead.

# syntax=docker/dockerfile:1
FROM redhat/ubi9-minimal as builder

RUN microdnf update -y && \
    microdnf install -y gcc sqlite-devel python3.11-devel python3.11-pip && \
    pip3.11 install --no-cache-dir -U pip && \
    pip3.11 install pysqlite3
coleifer commented 8 months ago

Yeah, the prebuilt binaries are x86-64. ARM or other architectures can build from source.