Skip to content

Commit

Permalink
[BUG] Consider each site_package
Browse files Browse the repository at this point in the history
Signed-off-by: Bennett <[email protected]>
  • Loading branch information
Bennett committed Nov 12, 2024
1 parent 3475ddc commit e48f56c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flytekit/tools/script_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def list_imported_modules_as_files(source_path: str, modules: List[ModuleType])
if os.path.commonpath([flytekit_root, mod_file]) == flytekit_root:
continue

if os.path.commonpath(site_packages + [mod_file]) in site_packages_set:
if any(
(os.path.commonpath([site_package, mod_file]) == site_package for site_package in site_packages_set)
):
# Do not upload files from site-packages
continue

Expand Down

0 comments on commit e48f56c

Please sign in to comment.