Skip to content

fix(build): pip install . auto-rebuilds the bundled native binary via soldr - #162

Closed
zackees wants to merge 1 commit into
mainfrom
feat/pip-autobuild-native
Closed

zackees wants to merge 1 commit into
mainfrom
feat/pip-autobuild-native

Conversation

@zackees

@zackees zackees commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • Fresh worktree (no staged exe): pip wheel . --no-deps triggers the soldr build; resulting binary rejects --internal-viewer not-a-url (post-fix: Tauri viewer loads the HTTP server URL instead of serving files from disk #157 behavior confirmed)
  • Up-to-date exe: second pip wheel . skips the rebuild (~12s total)
  • Backdated exe (June 7): pip wheel . rebuilds and restores a fresh binary
  • ruff / black / isort clean on setup.py

🤖 Generated with Claude Code

ensure_bundled_fastled_binary previously returned early whenever any
exe existed in src/fastled/bin, so `pip install .` silently bundled
days-old binaries (how a pre-#157 viewer shipped despite a fresh
install). Now the staged exe is only trusted when it is at least as
new as every Rust source (Cargo.toml, Cargo.lock, crates/**); anything
older triggers a soldr-cached `cargo build --release` so the wheel
always matches the checkout. CI is unaffected: it stages a freshly
cross-compiled exe immediately before building the wheel.

Also picks the newest built candidate instead of the first match and
drops the ~/.cargo/bin fallback, which could bundle an unrelated
binstall-installed fastled.

Refs #151, #160

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@zackees

zackees commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

Superseded by #166, which fixed the same staleness bug more aggressively: when Cargo.toml is present, setup.py now always runs 'soldr cargo build --release --bin fastled', purges stale staged binaries (src/fastled/bin + build/lib*), and removed the CARGO_HOME fallback. Merged to main as part of v2.0.11.

@zackees zackees closed this Jun 12, 2026
@zackees
zackees deleted the feat/pip-autobuild-native branch June 12, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant