Skip to content

Exclude Cargo target dir from wheel builds#334

Merged
glomatico merged 1 commit into
glomatico:mainfrom
daeho-ro:exclude-target-from-wheel
Jul 14, 2026
Merged

Exclude Cargo target dir from wheel builds#334
glomatico merged 1 commit into
glomatico:mainfrom
daeho-ro:exclude-target-from-wheel

Conversation

@daeho-ro

Copy link
Copy Markdown
Contributor

python-source = "." pulls the crate's target/ (and the wheel being written) into the wheel itself
→ 4 GiB zip error on sdist builds from homebrew build

.gitignore saves git checkouts but isn't in sdists. One-line exclude sorts it out.

python-source = "." makes maturin walk the whole project tree when
collecting files for the wheel. The Rust crate lives inside the package
at gamdl/downloader/ammuxer, so its Cargo target/ dir (including the
output wheel maturin is writing into target/wheels/) gets pulled into
the wheel. Building from a git checkout is unaffected because .gitignore
excludes target/, but sdists do not ship .gitignore, so any source build
(e.g. pip install --no-binary :all:, distro packaging) recursively packs
the growing output wheel into itself and maturin aborts with:

    Failed to write to zip archive for gamdl-3.8.3-...whl
    Large file option has not been set

Add an explicit exclude so target/ is dropped regardless of .gitignore.
@glomatico
glomatico merged commit 61801bc into glomatico:main Jul 14, 2026
1 check passed
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.

3 participants