added harmony and flame to skipped addons

This commit is contained in:
Jakub Trllo 2023-11-21 11:07:10 +01:00
parent a31214d2c4
commit f78f9c98f3
2 changed files with 35 additions and 15 deletions

View file

@ -68,6 +68,10 @@ IGNORED_FILENAMES_IN_AYON = {
"slack",
"kitsu",
}
IGNORED_HOSTS_IN_AYON = {
"flame",
"harmony",
}
# Inherit from `object` for Python 2 hosts
@ -536,6 +540,11 @@ def _load_modules():
addons_dir = os.path.join(os.path.dirname(current_dir), "addons")
module_dirs.append(addons_dir)
ignored_host_names = set(IGNORED_HOSTS_IN_AYON)
ignored_current_dir_filenames = set(IGNORED_DEFAULT_FILENAMES)
if AYON_SERVER_ENABLED:
ignored_current_dir_filenames |= IGNORED_FILENAMES_IN_AYON
processed_paths = set()
for dirpath in frozenset(module_dirs):
# Skip already processed paths
@ -551,9 +560,6 @@ def _load_modules():
is_in_current_dir = dirpath == current_dir
is_in_host_dir = dirpath == hosts_dir
ignored_current_dir_filenames = set(IGNORED_DEFAULT_FILENAMES)
if AYON_SERVER_ENABLED:
ignored_current_dir_filenames |= IGNORED_FILENAMES_IN_AYON
for filename in os.listdir(dirpath):
# Ignore filenames
@ -566,6 +572,12 @@ def _load_modules():
):
continue
if (
is_in_host_dir
and filename in ignored_host_names
):
continue
fullpath = os.path.join(dirpath, filename)
basename, ext = os.path.splitext(filename)

View file

@ -33,6 +33,20 @@ IGNORE_FILE_PATTERNS: List[Pattern] = [
}
]
IGNORED_HOSTS = [
"flame",
"harmony",
]
IGNORED_MODULES = [
"ftrack",
"shotgrid",
"sync_server",
"example_addons",
"slack",
"kitsu",
]
class ZipFileLongPaths(zipfile.ZipFile):
"""Allows longer paths in zip files.
@ -202,16 +216,6 @@ def create_openpype_package(
str(pyproject_path),
(private_dir / pyproject_path.name)
)
ignored_hosts = []
ignored_modules = [
"ftrack",
"shotgrid",
"sync_server",
"example_addons",
"slack",
"kitsu",
]
# Subdirs that won't be added to output zip file
ignored_subpaths = [
["addons"],
@ -219,11 +223,11 @@ def create_openpype_package(
]
ignored_subpaths.extend(
["hosts", host_name]
for host_name in ignored_hosts
for host_name in IGNORED_HOSTS
)
ignored_subpaths.extend(
["modules", module_name]
for module_name in ignored_modules
for module_name in IGNORED_MODULES
)
# Zip client
@ -297,6 +301,7 @@ def main(
# Make sure output dir is created
output_dir.mkdir(parents=True, exist_ok=True)
ignored_addons = set(IGNORED_HOSTS) | set(IGNORED_MODULES)
for addon_dir in current_dir.iterdir():
if not addon_dir.is_dir():
continue
@ -304,6 +309,9 @@ def main(
if addons and addon_dir.name not in addons:
continue
if addon_dir.name in ignored_addons:
continue
server_dir = addon_dir / "server"
if not server_dir.exists():
continue