Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,21 @@ def main(generate_input, generate_output):
if data.get("runMode") in ["spec-pull-request", "release"]:
apiview_start_time = time.time()
try:
_LOGGER.info(f"install apiview generation tool")
check_call(
[
"python",
"-m",
"pip",
"install",
"-r",
"eng/apiview_reqs.txt",
"--index-url=https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/",
],
Comment thread
msyyc marked this conversation as resolved.
timeout=600,
stderr=None if data.get("runMode") == "release" else subprocess.DEVNULL,
)
Comment thread
msyyc marked this conversation as resolved.

_LOGGER.info("generate apiview artifacts")
package_path = Path(sdk_folder, folder_name, package_name)
cmds = [
Expand All @@ -324,16 +339,16 @@ def main(generate_input, generate_output):
"--extract-metadata",
package_name,
"--dest-dir",
package_path.absolute(),
package_path.absolute().as_posix(),
]
_LOGGER.info(f"generate apiview file for package {package_name}")
check_call(
cmds,
timeout=900 if data.get("runMode") == "spec-pull-request" else 36000,
cwd=".",
# known issue that higher python version meet install warning with lower pylint.
# we skip the output here to reduce confusion and will remove it after apiview tool upgrade to higher pylint version.
stderr=subprocess.DEVNULL,
# in "release" mode we keep stderr so the output is visible for debugging.
stderr=None if data.get("runMode") == "release" else subprocess.DEVNULL,
)
for file in os.listdir(package_path):
if "_python.json" in file and package_name in file:
Expand Down
Loading