Skip to content

Commit 4fab68b

Browse files
committed
debug file hierarchy in if no library has been output
1 parent d0aa91d commit 4fab68b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/scripts/setup_addon.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def setup_addon_directory():
1919
Path(root).mkdir(exist_ok=True, parents=True)
2020

2121
all_files = os.listdir(".")
22+
23+
2224
if not [i for i in all_files if i.endswith(".pyd") or i.endswith(".so")]:
25+
list_files(".")
2326
raise Exception("no libraries were output")
2427
for f in all_files:
2528
if f.endswith(".py") or f.endswith(".pyd") or f.endswith(".so"):
@@ -35,6 +38,25 @@ def create_zip(input_dir, output_dir):
3538
return filepath
3639

3740

41+
def list_files(root_directory):
42+
excluded_directories = {"dependencies", "build", "__pycache__", ".github", ".git"}
43+
for root, _, files in os.walk(root_directory):
44+
should_skip = False
45+
for exclusion in excluded_directories:
46+
if exclusion in root:
47+
should_skip = True
48+
break
49+
if should_skip:
50+
continue
51+
52+
53+
level = root.replace(root_directory, '').count(os.sep)
54+
indent = ' ' * 4 * (level)
55+
print('{}{}/'.format(indent, os.path.basename(root)))
56+
subindent = ' ' * 4 * (level + 1)
57+
for f in files:
58+
print('{}{}'.format(subindent, f))
59+
3860
def read_version():
3961
with open(VERSION_FILEPATH, "r") as f:
4062
return f.read()

0 commit comments

Comments
 (0)