Description
build_sdist is not defined on AbstractResolver. HookSDistResolver and HookPrebuiltResolver don't define it either. Accessing resolver.build_sdist on these classes raises AttributeError. Any future subclass that forgets to add it will have the same problem.
Problem
When downstream code accesses resolver.build_sdist on a hook resolver, it will raise AttributeError.
Fix
- For HookPrebuiltResolver: add build_sdist = None. Pre-built wheels don't need an sdist build step. This is a fixed value, not user-configurable.
- HookSDistResolver: add build_sdist = BuildSDist.pep517 as a user-configurable instance field with a default. The hook can return an sdist, a tarball, or a git checkout, the user who writes the hook knows what it returns, so they should specify the build method in YAML.
Example:
source:
provider: hook-sdist
build_sdist: tarball # or pep517 (default)
Description
build_sdist is not defined on AbstractResolver. HookSDistResolver and HookPrebuiltResolver don't define it either. Accessing resolver.build_sdist on these classes raises AttributeError. Any future subclass that forgets to add it will have the same problem.
Problem
When downstream code accesses resolver.build_sdist on a hook resolver, it will raise AttributeError.
Fix
Example: