feat: add cython

This commit is contained in:
ConYel 2024-08-18 21:25:51 +02:00
parent a4e09144ba
commit 1ba508ed1a
No known key found for this signature in database
GPG key ID: DD9F5D50CAA0BAD4
2 changed files with 98 additions and 2 deletions

View file

@ -0,0 +1,42 @@
FROM scratch AS base
ENV VERSION=3.0.10
ENV SRC_HASH=00f97476cef9fcd9a89f9d2a49be3b518e1a74b91f377fe08c97fcb44bc0f7d7
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/cython/cython/archive/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/zlib . /
COPY --from=stagex/openssl . /
COPY --from=stagex/python . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/libffi . /
COPY --from=stagex/py-setuptools . /
COPY --from=stagex/py-installer . /
COPY --from=stagex/py-flit . /
COPY --from=stagex/py-gpep517 . /
COPY --from=stagex/py-wheel . /
COPY --from=stagex/py-distro . /
COPY --from=stagex/py-dateutil . /
COPY --from=stagex/py-urllib3 . /
COPY --from=stagex/py-cffi . /
RUN tar -xzf ${SRC_FILE}
WORKDIR cython-${VERSION}
RUN gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
#
FROM build AS install
RUN --network=none <<-EOF
set -eu
python -m installer -d /rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -322,6 +322,32 @@ out/curl/index.json: \
out/perl/index.json
$(call build,curl)
.PHONY: cython
cython: out/cython/index.json
out/cython/index.json: \
packages/cython/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/py-cffi/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-installer/index.json \
out/py-setuptools/index.json \
out/py-urllib3/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,cython)
.PHONY: diffutils
diffutils: out/diffutils/index.json
out/diffutils/index.json: \
@ -986,6 +1012,34 @@ out/libqrencode/index.json: \
out/musl/index.json
$(call build,libqrencode)
.PHONY: libseccomp
libseccomp: out/libseccomp/index.json
out/libseccomp/index.json: \
packages/libseccomp/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/cython/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/gperf/index.json \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/py-cffi/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-installer/index.json \
out/py-setuptools/index.json \
out/py-urllib3/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,libseccomp)
.PHONY: libtool
libtool: out/libtool/index.json
out/libtool/index.json: \
@ -1318,7 +1372,7 @@ out/mdbook/index.json: \
out/filesystem/index.json \
out/gcc/index.json \
out/libunwind/index.json \
out/llvm/index.json \
out/llvm16/index.json \
out/musl/index.json \
out/openssl/index.json \
out/rust/index.json \
@ -1471,7 +1525,7 @@ out/ocismack/index.json: \
out/filesystem/index.json \
out/gcc/index.json \
out/libunwind/index.json \
out/llvm/index.json \
out/llvm16/index.json \
out/musl/index.json \
out/openssl/index.json \
out/rust/index.json \