@@ -564,16 +564,22 @@ def get_full_import_path(self, imp):
564
564
"""
565
565
566
566
core_imp = os .path .join (self .core_source , imp )
567
- if os .path .exists (core_imp ):
567
+ if os .path .exists (core_imp ) or os .path .exists (
568
+ os .path .dirname (core_imp )
569
+ ):
568
570
return core_imp
569
571
570
572
# Reinstate when using Jules Shared from Jules
571
573
# jules_imp = os.path.join(self.jules_source, imp)
572
- # if os.path.exists(jules_imp):
574
+ # if os.path.exists(jules_imp) or os.path.exists(
575
+ # os.path.dirname(jules_imp)
576
+ # ):
573
577
# return jules_imp
574
578
575
579
apps_imp = os .path .join (self .root_path , imp )
576
- if os .path .exists (apps_imp ):
580
+ if os .path .exists (apps_imp ) or os .path .exists (
581
+ os .path .dirname (apps_imp )
582
+ ):
577
583
return apps_imp
578
584
579
585
raise Exception (
@@ -612,7 +618,7 @@ def read_meta_imports(self, meta_dir, flag="import"):
612
618
# Split the import line by '=' then take the rhs
613
619
# Then remove the trailing '/HEAD'
614
620
# Then prepend the path to the working copy
615
- imp = line .split ("=" , 1 )[1 ].strip ("/HEAD" )
621
+ imp = line .split ("=" , 1 )[1 ].removesuffix ("/HEAD" )
616
622
imp = self .get_full_import_path (imp )
617
623
imports .append (imp )
618
624
else :
@@ -1038,7 +1044,12 @@ def apply_macros_main(args):
1038
1044
"""
1039
1045
1040
1046
macro_object = ApplyMacros (
1041
- args .tag , args .cname , args .version , args .apps , args .core , args .jules
1047
+ args ["tag" ],
1048
+ args ["cname" ],
1049
+ args ["version" ],
1050
+ args ["apps" ],
1051
+ args ["core" ],
1052
+ args ["jules" ],
1042
1053
)
1043
1054
1044
1055
# Pre-process macros
@@ -1070,4 +1081,4 @@ def apply_macros_main(args):
1070
1081
1071
1082
if __name__ == "__main__" :
1072
1083
args = parse_args ()
1073
- apply_macros_main (args )
1084
+ apply_macros_main (vars ( args ) )
0 commit comments