@@ -40,6 +40,12 @@ def get_package_wheel_path(pkg_root, out_path):
4040 out_token_path = os .path .join (out_path , os .path .basename (pkg_path ))
4141 return pkg_path , out_token_path
4242
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+
4349if __name__ == "__main__" :
4450 parser = argparse .ArgumentParser (
4551 description = "Run apistubgen against target folder. "
@@ -73,10 +79,13 @@ def get_package_wheel_path(pkg_root, out_path):
7379 # Check if a wheel is already built for current package and install from wheel when available
7480 # If wheel is not available then install package from source
7581 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 )
7683
7784 cmds = ["apistubgen" , "--pkg-path" , pkg_path ]
7885 if out_token_path :
7986 cmds .extend (["--out-path" , out_token_path ])
87+ if cross_language_mapping_path :
88+ cmds .extend (["--mapping-path" , cross_language_mapping_path ])
8089
8190 logging .info ("Running apistubgen {}." .format (cmds ))
8291 check_call (cmds , cwd = args .work_dir )
0 commit comments