You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wire prepare_source and build_sdist for git-clone-based source resolvers #1205
When a package uses the new source: config with a git-clone-based resolver (github-tag-git, gitlab-tag-git, pypi-git), the resolve and clone steps work correctly via source_resolver.resolver_provider() and source_resolver.download(). However, the prepare_source step doesn't yet handle the cloned directory.
When a package uses the new source config with a git-clone-based resolver, req.url is None, so it takes the else path. That calls default_prepare_source() -> unpack_source(), which tries to open source_filename as a .tar.gz or .zip. But source_filename is a directory (the cloned git repo). This crashes with:
ValueError: Do not know how to unpack source archive /path/to/mypackage-1.0
Fix approach
The download step (Phase 3) returns (path, DownloadKind) from source_resolver.download(). Use DownloadKind.git_checkout to detect when the source is a directory:
Activity