Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only request source roots for PEP-517 deps that belong on the syspath (Cherry-pick of #16903) #16917

Merged
merged 1 commit into from Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/python/pants/backend/python/goals/setup_py.py
Expand Up @@ -450,7 +450,12 @@ async def package_python_dist(
source_roots_result = await Get(
SourceRootsResult,
SourceRootsRequest(
files=[], dirs={PurePath(tgt.address.spec_path) for tgt in transitive_targets.closure}
files=[],
dirs={
PurePath(tgt.address.spec_path)
for tgt in transitive_targets.closure
if tgt.has_field(PythonSourceField) or tgt.has_field(ResourceSourceField)
},
),
)
source_roots = tuple(sorted({sr.path for sr in source_roots_result.path_to_root.values()}))
Expand Down