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

[BUG] Consider each site_package #2920

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading