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

Enable APIStubGen step #12615

Merged
merged 14 commits into from
Jul 22, 2020
Prev Previous commit
Formatting changes
  • Loading branch information
praveenkuttappan committed Jul 22, 2020
commit 2c48ba6f7d6cb16b8f76f40da5b1fcad4f69c610
19 changes: 5 additions & 14 deletions eng/tox/run_apistubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

from subprocess import check_call, CalledProcessError
from subprocess import check_call
import argparse
import os
import logging
import sys

from tox_helper_tasks import find_whl, get_package_details

Expand All @@ -29,7 +28,9 @@ def get_package_wheel_path(pkg_root):


if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run apistubgen against target folder. ")
parser = argparse.ArgumentParser(
description="Run apistubgen against target folder. "
)

parser.add_argument(
"-t",
Expand All @@ -47,7 +48,6 @@ def get_package_wheel_path(pkg_root):
required=True,
)


args = parser.parse_args()

# Check if a wheel is already built for current package and install from wheel when available
Expand All @@ -56,13 +56,4 @@ def get_package_wheel_path(pkg_root):
if not pkg_path:
pkg_path = args.target_package


check_call(
[
"apistubgen",
"--pkg-path",
pkg_path,
],

cwd=args.work_dir
)
check_call(["apistubgen", "--pkg-path", pkg_path,], cwd=args.work_dir)