fix(dependencies): use the sdist requirements hook - #1352
mikedep333 wants to merge 1 commit into
Conversation
Call get_requires_for_build_sdist when discovering sdist dependencies instead of invoking the wheel requirements hook. Correct the matching docstring. Cover distinct wheel and sdist requirements, the empty default for an absent sdist hook, and a failing wheel hook using real backend subprocess calls. Closes: python-wheel-build#1351 Co-Authored-By: OpenAI Codex <noreply@openai.com> Signed-off-by: Mike DePaulo <mikedep333@redhat.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: python-wheel-build/fromager/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change aligns source-build dependency discovery with the sdist hook while preserving existing cache behavior. No actionable merge-blocking risk is identified; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@dhellmann I talked to tiran at the meeting, and he suggested asking you if there was an intentional reason why default_get_build_sdist_dependencies originally called get_requires_for_build_wheel |
Pull Request Description
What
Use
get_requires_for_build_sdist()when discovering sdist dependencies,and correct the associated docstring.
Add regression tests using real backend subprocess calls covering distinct
wheel and sdist requirements, an absent optional sdist hook, and a failing
wheel hook. All three cases fail before the fix and pass afterward.
Existing cached sdist requirements are not invalidated.
Why
Sdist dependency discovery currently calls the wheel requirements hook.
This can omit sdist-only dependencies, record wheel dependencies as sdist
requirements, and unnecessarily execute wheel-specific backend logic.
Closes #1351.