Prepare Python wheel releases - #1041
Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
|
This is pretty outside of my wheelhouse (ba dum tiss), and I was planning to sink a lot of my review bandwidth into https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4872 in the coming days, so FYI my first impression is that it may take me a little while to get to this and then take a while to get up to speed on it. |
d2af3f8 to
dbe8999
Compare
Okay. Now reassigned @tankyleo as we'll need this for next week's release (worst case I just run the updated scripts locally without prior review). Rebased after #1040 landed. |
dbe8999 to
8fffe35
Compare
| echo "Building Python wheel from commit $(git rev-parse HEAD)" | ||
| echo "Target: $(uname -s) $(uname -m)" | ||
|
|
||
| uv tool run --from "cibuildwheel[uv]==$CIBUILDWHEEL_VERSION" cibuildwheel \ |
There was a problem hiding this comment.
Had codex do a full dress rehearsal, it came up with this, but seems low priority so feel free to dismiss:
commit a81dff8cd9864b68dc4506f086de18987adb9bc8
Author: Leo Nash <hello@leonash.net>
Date: Fri Aug 14 00:57:22 2026 +0000
Select Python 3.11 for cibuildwheel
cibuildwheel 4.1 requires Python 3.11 or newer. When uv selected
Python 3.10, the wheel build failed before Docker could start.
Select Python 3.11 explicitly so uv installs a compatible interpreter
and the release build works when Python 3.10 is the default.
AI-Assisted-By: OpenAI Codex
diff --git a/scripts/python_build_wheel.sh b/scripts/python_build_wheel.sh
index 56ee4678..4b1337b6 100755
--- a/scripts/python_build_wheel.sh
+++ b/scripts/python_build_wheel.sh
@@ -127,7 +127,7 @@ trap cleanup EXIT
echo "Building Python wheel from commit $(git rev-parse HEAD)"
echo "Target: $(uname -s) $(uname -m)"
-uv tool run --from "cibuildwheel[uv]==$CIBUILDWHEEL_VERSION" cibuildwheel \
+uv tool run --python 3.11 --from "cibuildwheel[uv]==$CIBUILDWHEEL_VERSION" cibuildwheel \
bindings/python \
--config-file bindings/python/pyproject.toml \
--output-dir "$OUTPUT_DIR"There was a problem hiding this comment.
Thanks. Addressed this by amending.
There was a problem hiding this comment.
Sounds like the --python 3.11 flag is still missing from the uv tool run call ?
Build Python-ABI-independent wheels for supported Linux and macOS targets so users can install LDK Node directly from PyPI. Keep build and publication available through local scripts. Require the complete artifact set on TestPyPI before production, and exercise the bindings on the oldest and newest supported CPython versions. Co-Authored-By: HAL 9000
8fffe35 to
63a0d8b
Compare
|
Now also amended to allow building macOS x86_64 wheels on aarch64 macs. |
Assisted-by: OpenAI Codex
cibuildwheel copies the repository into its Linux build container. Ignored build outputs such as target/, virtual environments, and dist/ can make that context several gigabytes, slowing builds or exhausting Docker storage. Export tracked and non-ignored untracked files to a temporary source directory before invoking cibuildwheel. This keeps ignored artifacts out of the container context while preserving local changes for --allow-dirty builds. Assisted-by: OpenAI Codex
Match the Python wheel version to the Rust crate and intended release. Assisted-by: OpenAI Codex
Declare the dual-license expression and package both canonical license texts. Assisted-by: OpenAI Codex
Track both lockfiles and require Cargo to use them while generating Python wheel bindings. Assisted-by: OpenAI Codex
tankyleo
left a comment
There was a problem hiding this comment.
Pushed a couple of commits on top of your branch that came up after a few rounds with codex, feel free to drop and amend as needed.
Build Python-ABI-independent wheels for supported Linux and macOS targets so users can install LDK Node directly from PyPI.
Keep build and publication available through local scripts. Require the complete artifact set on TestPyPI before production, and exercise the bindings on the oldest and newest supported CPython versions.