Skip to content

Commit

Permalink
add root dir to addon zip
Browse files Browse the repository at this point in the history
  • Loading branch information
PrevuMax committed Jul 14, 2021
1 parent 8778ca8 commit bd7f1c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/scripts/setup_addon.py
Expand Up @@ -14,14 +14,15 @@ def setup_addon_directory():
plateform_name = "windows" if platform.system() == "Windows" else "linux"
version = read_version()
addon_dirpath = os.path.join(TMP_DIRPATH, f"modular_tree_{version}_{plateform_name}")
Path(addon_dirpath).mkdir(exist_ok=True, parents=True)
root = os.path.join(addon_dirpath, "modular_tree")
Path(root).mkdir(exist_ok=True, parents=True)

all_files = os.listdir(".")
for f in all_files:
if f.endswith(".py") or f.endswith(".pyd") or f.endswith(".so"):
shutil.copy2(os.path.join(".",f), addon_dirpath)
shutil.copy2(os.path.join(".",f), root)
elif f == ADDON_SOURCE_DIR:
shutil.copytree(os.path.join(".",f), os.path.join(addon_dirpath, f))
shutil.copytree(os.path.join(".",f), os.path.join(root, f))

return addon_dirpath

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -39,3 +39,4 @@ m_tree/m_tree.egg-info/
m_tree.egg-info/
*.exp
*/binaries/
tmp/*

0 comments on commit bd7f1c1

Please sign in to comment.