feat: add beancount tool and dependencies

This commit is contained in:
ConYel 2024-08-27 00:21:29 +02:00
parent b964dbced5
commit a07bcf9026
No known key found for this signature in database
GPG key ID: DD9F5D50CAA0BAD4
8 changed files with 505 additions and 0 deletions

View file

@ -0,0 +1,54 @@
FROM scratch AS base
ENV PY_PACKAGE=beancount
ENV VERSION=2.3.6
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_HASH=d02819a18fcf2974287a8d2d0949a47b3d2bc4a1b27642cb0424e773207a03e5
ENV SRC_SITE=https://github.com/${PY_PACKAGE}/${PY_PACKAGE}/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/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/zlib . /
COPY --from=stagex/openssl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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-packaging . /
COPY --from=stagex/py-pluggy . /
COPY --from=stagex/py-ply . /
COPY --from=stagex/py-bottle . /
COPY --from=stagex/py-lxml . /
COPY --from=stagex/py-magic . /
COPY --from=stagex/py-pathspec . /
COPY --from=stagex/py-hatchling . /
COPY --from=stagex/py-trove-classifiers . /
COPY --from=stagex/py-requests . /
COPY --from=stagex/py-soupsieve . /
COPY --from=stagex/py-beautifulsoup4 . /
RUN tar -xzf ${SRC_FILE}
WORKDIR /${PY_PACKAGE}-${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

@ -0,0 +1,46 @@
FROM scratch AS base
ENV PY_PACKAGE=beautifulsoup4
ENV VERSION=4.12.3
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_HASH=74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051
ENV SRC_SITE=https://files.pythonhosted.org/packages/source/b/${PY_PACKAGE}/${PY_PACKAGE}-${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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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-packaging . /
COPY --from=stagex/py-pluggy . /
COPY --from=stagex/py-pathspec . /
COPY --from=stagex/py-hatchling . /
COPY --from=stagex/py-trove-classifiers . /
COPY --from=stagex/py-soupsieve . /
RUN tar -xzf ${PY_PACKAGE}-${SRC_FILE}
WORKDIR /${PY_PACKAGE}-${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

@ -0,0 +1,42 @@
FROM scratch AS base
ENV VERSION=0.12.25
ENV SRC_FILE=${VERSION}.tar.gz
ENV PY_PACKAGE=bottle
ENV SRC_HASH=e1a9c94970ae6d710b3fb4526294dfeb86f2cb4a81eff3a4b98dc40fb0e5e021
ENV SRC_SITE=https://files.pythonhosted.org/packages/source/b/${PY_PACKAGE}/${PY_PACKAGE}-${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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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 ${PY_PACKAGE}-${SRC_FILE}
WORKDIR /${PY_PACKAGE}-${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

@ -0,0 +1,42 @@
FROM scratch AS base
ENV VERSION=3.3.2
ENV SRC_FILE=${VERSION}.tar.gz
ENV PY_PACKAGE=charset_normalizer
ENV SRC_HASH=9948e5c17831916ef192cf3f26c744d539eb6f4e9e3b02eea649552c52b10d91
ENV SRC_SITE=https://github.com/jawah/${PY_PACKAGE}/archive/refs/tags/${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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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 /${PY_PACKAGE}-${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

@ -0,0 +1,44 @@
FROM scratch AS base
ENV VERSION=5.3.0
ENV SRC_FILE=${VERSION}.tar.gz
ENV PY_PACKAGE=lxml
ENV SRC_HASH=eb22f7ceb319c29247cfa398435d00e6286d19a32b4870b67a8e9a38d72f2ebd
ENV SRC_SITE=https://github.com/${PY_PACKAGE}/${PY_PACKAGE}/archive/refs/tags/${PY_PACKAGE}-${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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/libxml2 . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/python . /
COPY --from=stagex/cython . /
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 . /
RUN tar -xzf ${PY_PACKAGE}-${SRC_FILE}
WORKDIR /${PY_PACKAGE}-${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

@ -0,0 +1,43 @@
FROM scratch AS base
ENV VERSION=3.11
ENV SRC_FILE=${VERSION}.tar.gz
ENV PY_PACKAGE=ply
ENV SRC_HASH=928c5642612f4710b168d3c49c25f6ece2913a5e8d1c5e37fde5d6162fec3fd2
ENV SRC_SITE=https://github.com/dabeaz/${PY_PACKAGE}/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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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 /${PY_PACKAGE}-${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

@ -0,0 +1,45 @@
FROM scratch AS base
ENV PY_PACKAGE=soupsieve
ENV VERSION=2.6
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_HASH=e65fd415de8d5ef25ee970b457fcb5c2f2edc920f12d4712eb09c3ea19552b75
ENV SRC_SITE=https://github.com/facelessuser/soupsieve/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/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/libffi . /
COPY --from=stagex/python . /
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-packaging . /
COPY --from=stagex/py-pluggy . /
COPY --from=stagex/py-pathspec . /
COPY --from=stagex/py-hatchling . /
COPY --from=stagex/py-trove-classifiers . /
RUN tar -xzf ${SRC_FILE}
WORKDIR /${PY_PACKAGE}-${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

@ -241,6 +241,41 @@ out/bc/index.json: \
out/texinfo/index.json
$(call build,bc)
.PHONY: beancount
beancount: out/beancount/index.json
out/beancount/index.json: \
packages/beancount/Containerfile \
out/binutils/index.json \
out/busybox/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-beautifulsoup4/index.json \
out/py-bottle/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-hatchling/index.json \
out/py-installer/index.json \
out/py-lxml/index.json \
out/py-magic/index.json \
out/py-packaging/index.json \
out/py-pathspec/index.json \
out/py-pluggy/index.json \
out/py-ply/index.json \
out/py-requests/index.json \
out/py-setuptools/index.json \
out/py-soupsieve/index.json \
out/py-trove-classifiers/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,beancount)
.PHONY: binutils
binutils: out/binutils/index.json
out/binutils/index.json: \
@ -2579,6 +2614,34 @@ out/py-babel/index.json: \
out/zlib/index.json
$(call build,py-babel)
.PHONY: py-beautifulsoup4
py-beautifulsoup4: out/py-beautifulsoup4/index.json
out/py-beautifulsoup4/index.json: \
packages/py-beautifulsoup4/Containerfile \
out/busybox/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-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-hatchling/index.json \
out/py-installer/index.json \
out/py-packaging/index.json \
out/py-pathspec/index.json \
out/py-pluggy/index.json \
out/py-setuptools/index.json \
out/py-soupsieve/index.json \
out/py-trove-classifiers/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,py-beautifulsoup4)
.PHONY: py-botocore
py-botocore: out/py-botocore/index.json
out/py-botocore/index.json: \
@ -2592,6 +2655,30 @@ out/py-botocore/index.json: \
out/zlib/index.json
$(call build,py-botocore)
.PHONY: py-bottle
py-bottle: out/py-bottle/index.json
out/py-bottle/index.json: \
packages/py-bottle/Containerfile \
out/busybox/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,py-bottle)
.PHONY: py-build
py-build: out/py-build/index.json
out/py-build/index.json: \
@ -2636,6 +2723,30 @@ out/py-cffi/index.json: \
out/zlib/index.json
$(call build,py-cffi)
.PHONY: py-charset-normalizer
py-charset-normalizer: out/py-charset-normalizer/index.json
out/py-charset-normalizer/index.json: \
packages/py-charset-normalizer/Containerfile \
out/busybox/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,py-charset-normalizer)
.PHONY: py-colorama
py-colorama: out/py-colorama/index.json
out/py-colorama/index.json: \
@ -2917,6 +3028,32 @@ out/py-libarchive/index.json: \
out/zlib/index.json
$(call build,py-libarchive)
.PHONY: py-lxml
py-lxml: out/py-lxml/index.json
out/py-lxml/index.json: \
packages/py-lxml/Containerfile \
out/busybox/index.json \
out/cython/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libffi/index.json \
out/libxml2/index.json \
out/libxslt/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/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,py-lxml)
.PHONY: py-magic
py-magic: out/py-magic/index.json
out/py-magic/index.json: \
@ -3036,6 +3173,30 @@ out/py-pluggy/index.json: \
out/zlib/index.json
$(call build,py-pluggy)
.PHONY: py-ply
py-ply: out/py-ply/index.json
out/py-ply/index.json: \
packages/py-ply/Containerfile \
out/busybox/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,py-ply)
.PHONY: py-prompt_toolkit
py-prompt_toolkit: out/py-prompt_toolkit/index.json
out/py-prompt_toolkit/index.json: \
@ -3214,6 +3375,33 @@ out/py-snowballstemmer/index.json: \
out/zlib/index.json
$(call build,py-snowballstemmer)
.PHONY: py-soupsieve
py-soupsieve: out/py-soupsieve/index.json
out/py-soupsieve/index.json: \
packages/py-soupsieve/Containerfile \
out/busybox/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-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-hatchling/index.json \
out/py-installer/index.json \
out/py-packaging/index.json \
out/py-pathspec/index.json \
out/py-pluggy/index.json \
out/py-setuptools/index.json \
out/py-trove-classifiers/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,py-soupsieve)
.PHONY: py-sphinx
py-sphinx: out/py-sphinx/index.json
out/py-sphinx/index.json: \
@ -3458,6 +3646,7 @@ out/python/index.json: \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/ncurses/index.json \
out/openssl/index.json \
out/sqlite3/index.json \
out/zlib/index.json