fix: skip building editable deps as wheels and fix src-layout module resolution#809
Draft
fix: skip building editable deps as wheels and fix src-layout module resolution#809
Conversation
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--no-install-package <name>for each editable dependency to theuv synccommand in both remote and Docker builders, preventing uv from trying to build editable deps as wheels (which fails when they have[build-system]requiringuv_build)extract_obj_module()now usessys.pathentries to find the correct Python package root instead of computing paths from the monorepo root (e.g.,my_app.maininstead ofmy_app.src.my_app.main)_F_SYS_PATHto excludesite-packagesentries and remove script directory entries that shadow real packagesTest plan
pytest tests/flyte/imagebuild/test_utils.pyget_uv_project_editable_package_names()(happy path + edge cases)my_app.mainfor src-layout projects_F_SYS_PATHfiltering:./my_app/src:./my_lib/src:./.(no site-packages, no script dir)02_sibling_packagesexample