Skip to content

Commit

Permalink
Refactor build_and_assemble_apple_pods.py for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
vraspar committed Aug 1, 2024
1 parent 2e790c6 commit 9eacb33
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tools/ci_build/github/apple/build_and_assemble_apple_pods.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def main():

run(build_apple_framework_args)

print("framework Out" : str (build_dir / "framework_out"))

Check failure

Code scanning / CodeQL

Syntax error Error

Syntax Error (in Python 3).
run(["ls", "-LR", str(build_dir / "framework_out")])

if args.test:
test_apple_packages_args = [
sys.executable,
Expand Down Expand Up @@ -148,6 +151,9 @@ def main():
package_variant=package_variant,
)

print("C pod dir:", c_pod_staging_dir)
run(["ls", "-LR", str(c_pod_staging_dir)])

if args.test:
test_c_pod_args = ["pod", "lib", "lint", "--verbose"]

Expand Down
7 changes: 7 additions & 0 deletions tools/ci_build/github/apple/build_apple_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ def _build_package(args):

subprocess.run(build_xcframework_cmd, shell=False, check=True, cwd=REPO_DIR)

# For debugging
print("XCFramework dir:" , xcframework_dir)
result = subprocess.run(
["ls", "-lR"], shell=False, check=True, cwd=xcframework_dir, stdout=subprocess.PIPE, text=True
)
print(result.stdout)


def parse_args():
parser = argparse.ArgumentParser(
Expand Down
4 changes: 2 additions & 2 deletions tools/ci_build/github/apple/c/assemble_c_pod_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def assemble_c_pod_package(
print("Warning: staging directory already exists", file=sys.stderr)

# copy the necessary files to the staging directory
shutil.copytree(framework_dir, staging_dir / framework_dir.name, dirs_exist_ok=True)
shutil.copytree(public_headers_dir, staging_dir / public_headers_dir.name, dirs_exist_ok=True)
shutil.copytree(framework_dir, staging_dir / framework_dir.name, dirs_exist_ok=True, symlinks=True)
shutil.copytree(public_headers_dir, staging_dir / public_headers_dir.name, dirs_exist_ok=True, symlinks=True)
copy_repo_relative_to_dir(["LICENSE"], staging_dir)

# generate the podspec file from the template
Expand Down

0 comments on commit 9eacb33

Please sign in to comment.