@@ -312,35 +312,25 @@ def main(generate_input, generate_output):
312312 run_post_emitter_script (sdk_code_path )
313313
314314 # Generate ApiView
315- if data .get ("runMode" ) in ["spec-pull-request" ]:
315+ if data .get ("runMode" ) in ["spec-pull-request" , "release" ]:
316316 apiview_start_time = time .time ()
317317 try :
318- _LOGGER .info ("install dependencies for apiview generation " )
318+ _LOGGER .info ("generate apiview artifacts " )
319319 package_path = Path (sdk_folder , folder_name , package_name )
320- check_call (
321- [
322- "python" ,
323- "-m" ,
324- "pip" ,
325- "install" ,
326- "-r" ,
327- "../../../eng/apiview_reqs.txt" ,
328- "--index-url=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi"
329- "/simple/" ,
330- ],
331- cwd = package_path ,
332- timeout = 600 ,
333- )
334- cmds = ["apistubgen" , "--pkg-path" , "." ]
335- cross_language_mapping_path = Path (package_path , "apiview-properties.json" )
336- if cross_language_mapping_path .exists ():
337- cmds .extend (["--mapping-path" , str (cross_language_mapping_path )])
338-
320+ cmds = [
321+ "azpysdk" ,
322+ "apistub" ,
323+ "--md" ,
324+ "--extract-metadata" ,
325+ package_name ,
326+ "--dest-dir" ,
327+ package_path .absolute (),
328+ ]
339329 _LOGGER .info (f"generate apiview file for package { package_name } " )
340330 check_call (
341331 cmds ,
342- cwd = package_path ,
343- timeout = 600 ,
332+ timeout = 900 if data . get ( "runMode" ) == "spec-pull-request" else 36000 ,
333+ cwd = "." ,
344334 # known issue that higher python version meet install warning with lower pylint.
345335 # we skip the output here to reduce confusion and will remove it after apiview tool upgrade to higher pylint version.
346336 stderr = subprocess .DEVNULL ,
0 commit comments