@@ -40,6 +40,12 @@ def get_package_wheel_path(pkg_root, out_path):
40
40
out_token_path = os .path .join (out_path , os .path .basename (pkg_path ))
41
41
return pkg_path , out_token_path
42
42
43
+ def get_cross_language_mapping_path (pkg_root ):
44
+ mapping_path = os .path .join (pkg_root , "apiview-properties.json" )
45
+ if os .path .exists (mapping_path ):
46
+ return mapping_path
47
+ return None
48
+
43
49
if __name__ == "__main__" :
44
50
parser = argparse .ArgumentParser (
45
51
description = "Run apistubgen against target folder. "
@@ -73,10 +79,13 @@ def get_package_wheel_path(pkg_root, out_path):
73
79
# Check if a wheel is already built for current package and install from wheel when available
74
80
# If wheel is not available then install package from source
75
81
pkg_path , out_token_path = get_package_wheel_path (args .target_package , args .out_path )
82
+ cross_language_mapping_path = get_cross_language_mapping_path (args .target_package )
76
83
77
84
cmds = ["apistubgen" , "--pkg-path" , pkg_path ]
78
85
if out_token_path :
79
86
cmds .extend (["--out-path" , out_token_path ])
87
+ if cross_language_mapping_path :
88
+ cmds .extend (["--mapping-path" , cross_language_mapping_path ])
80
89
81
90
logging .info ("Running apistubgen {}." .format (cmds ))
82
91
check_call (cmds , cwd = args .work_dir )
0 commit comments