From fa486c2b76cf092be4b8fb3f3b0467f21433710a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 3 Jun 2026 18:20:35 +0900 Subject: [PATCH 1/2] chore: build musl release target --- scripts/release.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 2863dcc..ce2b355 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -4,10 +4,8 @@ import subprocess import tarfile from pathlib import Path - from prebuild import get_pyapp, rebuild_cpython - root = Path(__file__).resolve().parents[1] output = root.joinpath("dist") build_dir = root.joinpath("build") @@ -17,6 +15,7 @@ wheel = builder.build("wheel", output_directory=output) stem = Path(wheel).stem tarname = f"{stem}.tar.gz" + metadata = stem.split("-") appname = metadata[0] version = metadata[1] @@ -44,9 +43,18 @@ env["PYAPP_FULL_ISOLATION"] = "true" env["PYAPP_DISTRIBUTION_PATH"] = str(cpython) env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3" -proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir) +target = "x86_64-unknown-linux-musl" +build_params = [ "cargo", "build", "--release", "--target", target] + +proc = subprocess.run( + build_params, + env=env, + cwd=pyapp_dir, +) + +# TODO: set proper release tags on tarfile if proc.returncode == 0: - output_exe = build_dir.joinpath("pyapp-latest/target/release/pyapp") + output_exe = build_dir.joinpath(f"pyapp-latest/target/{target}/release/pyapp") release_exe = output.joinpath(appname) output_exe.rename(release_exe) tarpath = output.joinpath(tarname) From 41b0e86fdaa3a4a5e9662cb7017ecdaaebf14c41 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 3 Jun 2026 19:35:30 +0900 Subject: [PATCH 2/2] docs: update DEVELOPERS.md --- DEVELOPERS.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 609fa8a..886aae1 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -13,11 +13,6 @@ git submodule update --recursive --init sphinx-build -M html source build -a # Building standalone DZGUI release binaries -1. Run `./scripts/dl_pyapp.sh` -# TODO: secondary script that packs this archive -2. Download cpython 3.13, linux, gnu, v3 -https://github.com/astral-sh/python-build-standalone/releases/download/20251014/cpython-3.13.9%2B20251014-x86_64_v3-unknown-linux-gnu-install_only_stripped.tar.gz -3. Explicitly install dependencies into site-packages -4. Pack back into a tarball -5. Run `python3 scripts/release.py` -6. Generate a release and tag against the bundled `dzgui` executable +1. Set up the build target: `rustup target add x86_64-unknown-linux-musl` +2. Run `python3 scripts/release.py` +3. Generate a release and tag against the bundled `dzgui` executable