Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open apiview for mgmt sdk #38143

Merged
merged 1 commit into from
Oct 29, 2024
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
43 changes: 21 additions & 22 deletions tools/azure-sdk-tools/packaging_tools/sdk_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,27 @@ def main(generate_input, generate_output):
package["artifacts"] = [str(dist_path / package_file) for package_file in os.listdir(dist_path)]
package["result"] = "succeeded"
# Generate api stub File
if "azure-mgmt-" not in package_name:
try:
package_path = Path(sdk_folder, folder_name, package_name)
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/",
],
cwd=package_path,
timeout=300,
)
check_call(["apistubgen", "--pkg-path", "."], cwd=package_path, timeout=600)
for file in os.listdir(package_path):
if "_python.json" in file and package_name in file:
package["apiViewArtifact"] = str(Path(package_path, file))
except Exception as e:
_LOGGER.error(f"Fail to generate ApiView token file for {package_name}: {e}")
try:
package_path = Path(sdk_folder, folder_name, package_name)
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/",
],
cwd=package_path,
timeout=600,
)
check_call(["apistubgen", "--pkg-path", "."], cwd=package_path, timeout=600)
for file in os.listdir(package_path):
if "_python.json" in file and package_name in file:
package["apiViewArtifact"] = str(Path(package_path, file))
except Exception as e:
_LOGGER.error(f"Fail to generate ApiView token file for {package_name}: {e}")
# Installation package
package["installInstructions"] = {
"full": "You can install the use using pip install of the artifacts.",
Expand Down
Loading