@@ -48,10 +48,10 @@ def get_ihp(
48
48
version ,
49
49
)
50
50
repo = ihp_future .result ()
51
- current_task = progress .add_task (
52
- "Updating submodules…" , total = 100
51
+ current_task = progress .add_task ("Updating submodules…" , total = 100 )
52
+ repo .init_submodule (
53
+ callback = lambda x : progress .update (current_task , completed = x )
53
54
)
54
- repo .init_submodule (callback = lambda x : progress .update (current_task , completed = x ))
55
55
repo_path = repo .path
56
56
console .log (f"Done fetching { ihp_repo .name } ." )
57
57
else :
@@ -68,22 +68,24 @@ def get_ihp(
68
68
def build_ihp (build_directory , ihp_path ):
69
69
# """Build"""
70
70
try :
71
- shutil .rmtree (os .path .join (build_directory , "ihp-sg13g2 " ))
71
+ shutil .rmtree (os .path .join (build_directory , "ihp_sg13g2 " ))
72
72
except FileNotFoundError :
73
73
pass
74
74
shutil .copytree (
75
75
os .path .join (ihp_path , "ihp-sg13g2" ),
76
- os .path .join (build_directory , "ihp-sg13g2" ),
77
- ignore = lambda dir , files : files if ".git" in os .path .split (dir ) else [".git" , ".DS_Store" ]
76
+ os .path .join (build_directory , "ihp_sg13g2" ),
77
+ ignore = lambda dir , files : (
78
+ files if ".git" in os .path .split (dir ) else [".git" , ".DS_Store" ]
79
+ ),
78
80
)
79
81
80
82
81
83
def install_ihp (build_directory , pdk_root , version ):
82
84
console = Console ()
83
85
with console .status ("Adding build to list of installed versions…" ):
84
- ihp_sg13g2_family = Family .by_name ["ihp-sg13g2 " ]
86
+ ihp_sg13g2_family = Family .by_name ["ihp_sg13g2 " ]
85
87
86
- version_directory = Version (version , "ihp-sg13g2 " ).get_dir (pdk_root )
88
+ version_directory = Version (version , "ihp_sg13g2 " ).get_dir (pdk_root )
87
89
if (
88
90
os .path .exists (version_directory )
89
91
and len (os .listdir (version_directory )) != 0
@@ -92,7 +94,7 @@ def install_ihp(build_directory, pdk_root, version):
92
94
it = 0
93
95
while os .path .exists (backup_path ) and len (os .listdir (backup_path )) != 0 :
94
96
it += 1
95
- backup_path = Version (f"{ version } .bk{ it } " , "ihp-sg13g2 " ).get_dir (
97
+ backup_path = Version (f"{ version } .bk{ it } " , "ihp_sg13g2 " ).get_dir (
96
98
pdk_root
97
99
)
98
100
console .log (
@@ -130,7 +132,7 @@ def build(
130
132
using_repos = {}
131
133
132
134
build_directory = os .path .join (
133
- get_volare_dir (pdk_root , "ihp-sg13g2 " ), "build" , version
135
+ get_volare_dir (pdk_root , "ihp_sg13g2 " ), "build" , version
134
136
)
135
137
timestamp = datetime .now ().strftime ("build_ihp-sg13g2-%Y-%m-%d-%H-%M-%S" )
136
138
log_dir = os .path .join (build_directory , "logs" , timestamp )
0 commit comments