Skip to content

fix: skip building editable deps as wheels and fix src-layout module resolution#809

Draft
pingsutw wants to merge 6 commits intomainfrom
fix-uv-project-2
Draft

fix: skip building editable deps as wheels and fix src-layout module resolution#809
pingsutw wants to merge 6 commits intomainfrom
fix-uv-project-2

Conversation

@pingsutw
Copy link
Member

@pingsutw pingsutw commented Mar 18, 2026

Summary

  • Add --no-install-package <name> for each editable dependency to the uv sync command in both remote and Docker builders, preventing uv from trying to build editable deps as wheels (which fails when they have [build-system] requiring uv_build)
  • Fix module path resolution for src-layout projects in monorepos: extract_obj_module() now uses sys.path entries to find the correct Python package root instead of computing paths from the monorepo root (e.g., my_app.main instead of my_app.src.my_app.main)
  • Filter _F_SYS_PATH to exclude site-packages entries and remove script directory entries that shadow real packages

Test plan

  • Existing tests pass: pytest tests/flyte/imagebuild/test_utils.py
  • New unit tests for get_uv_project_editable_package_names() (happy path + edge cases)
  • Verified module path resolution produces my_app.main for src-layout projects
  • Verified _F_SYS_PATH filtering: ./my_app/src:./my_lib/src:./. (no site-packages, no script dir)
  • End-to-end test with 02_sibling_packages example

pingsutw and others added 6 commits March 17, 2026 15:21
Signed-off-by: Kevin Su <pingsutw@apache.org>
…resolution

When using with_uv_project() with dependencies_only mode, uv still tries
to build editable deps as wheels even with --no-install-project. This fails
when editable deps have [build-system] requiring uv_build.

Add --no-install-package for each editable dep so uv resolves their
dependency trees but skips building/installing the packages themselves.

Also fix module resolution for src-layout projects where root_dir covers
a monorepo: use sys.path entries to find the correct Python package root
(e.g., my_app/src/) instead of computing module paths from the monorepo
root (which produces invalid paths like my_app.src.my_app.main).

Filter _F_SYS_PATH to exclude site-packages and script directory entries
that shadow real packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
tomllib is only available in Python 3.11+, but the SDK supports >=3.10.
Switch to the toml package which is already a direct dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@pingsutw pingsutw self-assigned this Mar 18, 2026
@pingsutw pingsutw marked this pull request as draft March 18, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant