Exclude Cargo target dir from wheel builds

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.
This commit is contained in:
Daeho Ro
2026-07-14 12:38:26 +09:00
parent 234e9fac83
commit b16d16fcb3
+1
View File
@@ -44,3 +44,4 @@ module-name = "gamdl._ammuxer"
python-source = "."
features = ["pyo3/extension-module"]
include = ["LICENSE"]
exclude = ["**/target/**"]