Skip to content

Fix formula: rework as sdist/wheel hybrid - #3

Merged
pokryfka merged 1 commit into
mainfrom
fix-hybrid-resources
Jul 10, 2026
Merged

pokryfka merged 1 commit into
mainfrom
fix-hybrid-resources

Conversation

@pokryfka

Copy link
Copy Markdown
Owner

Summary

  • PR Add CI workflow to test brew install #2's CI failed installing bsdiff4: Homebrew's pip_install always passes --no-binary=:all: to pip, and only special-cases wheels tagged exactly *-py3-none-any.whl (installs that file directly). Any other wheel (i.e. every platform-specific wheel a compiled package ships) gets staged as a directory, and pip fails since a wheel has no setup.py/pyproject.toml.
  • Rework Formula/dcode.rb as a hybrid: pure-Python packages keep their py3-none-any wheel; the 25 packages with native extensions (cryptography, pydantic-core, orjson, pillow, etc.) go back to sdist and build from source, restoring rust/freetype/jpeg-turbo as build dependencies.
  • quickjs-rs keeps its wheel (bundles its own .wasm payloads, genuinely self-contained). wasmtime goes back to sdist (its any wheel is ctypes-only, no bundled native lib). sqlite-vec (no sdist, no universal wheel) is excluded from virtualenv_install_with_resources and staged/installed manually.
  • Updates README to explain the hybrid approach and the --no-binary=:all: constraint.

Test plan


Generated by Claude Code

Homebrew's Language::Python::Virtualenv#pip_install always invokes
pip with --no-binary=:all:, and only special-cases wheels tagged
exactly *-py3-none-any.whl (installed by direct file path, bypassing
the flag). Any other wheel gets staged as a directory and pip fails
with "Neither 'setup.py' nor 'pyproject.toml' found" -- confirmed by
PR #2's CI failing on bsdiff4's manylinux wheel.

Rework the formula as a hybrid: pure-Python packages keep their
py3-none-any wheel (fast, no compile); the 25 packages with native
extensions (cryptography, pydantic-core, orjson, pillow, etc.) go
back to sdist and build from source, restoring the rust/freetype/
jpeg-turbo build dependencies. quickjs-rs keeps its wheel since it
bundles its own .wasm payloads (self-contained); wasmtime goes back
to sdist since its "any" wheel is just ctypes bindings with no
bundled native library. sqlite-vec (no sdist, no universal wheel)
is excluded from virtualenv_install_with_resources and staged/
installed manually in `install` instead, since Homebrew's resource
mechanism has no path that works for it at all.
@pokryfka
pokryfka merged commit 73db722 into main Jul 10, 2026
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.

2 participants