diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 3e1779f1d88b9..a38087aa0313a 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1749,12 +1749,7 @@ def run_ios_tests(args, source_dir, config, cwd): if args.build_apple_framework: package_test_py = os.path.join(source_dir, "tools", "ci_build", "github", "apple", "test_ios_packages.py") - framework_info_file_path = os.path.join(cwd, "framework_info.json") - framework_info_file = "" - if os.path.exists(framework_info_file_path): - framework_info_file = os.path.join(cwd, "framework_info.json") - else: - framework_info_file = os.path.join(cwd, "framework_info_macos.json") + framework_info_file = os.path.join(cwd, "framework_info.json") dynamic_framework_dir = os.path.join(cwd, config + "-" + args.ios_sysroot) static_framework_dir = os.path.join(cwd, config + "-" + args.ios_sysroot, "static_framework") # test dynamic framework diff --git a/tools/ci_build/github/apple/build_and_assemble_ios_pods.py b/tools/ci_build/github/apple/build_and_assemble_ios_pods.py index 3fb799f10a35d..d3443e6cb0f4d 100755 --- a/tools/ci_build/github/apple/build_and_assemble_ios_pods.py +++ b/tools/ci_build/github/apple/build_and_assemble_ios_pods.py @@ -64,7 +64,6 @@ def parse_args(): ) build_framework_group.add_argument("--include-ops-by-config") - build_framework_group.add_argument( "--build-settings-file", required=True, help="The positional argument of build_ios_framework.py." ) @@ -115,11 +114,6 @@ def main(): if args.include_ops_by_config is not None: build_ios_framework_args += ["--include_ops_by_config", args.include_ops_by_config] - framework_info_macos_file = None - if args.build_for_macosx: - framework_info_macos_file = build_dir / "framework_info_macos.json" - build_ios_framework_args += ["--build_for_macosx"] - build_ios_framework_args += ["--build_dir", str(build_dir), args.build_settings_file] run(build_ios_framework_args) @@ -154,7 +148,6 @@ def main(): framework_dir=build_dir / "framework_out" / "onnxruntime.xcframework", public_headers_dir=build_dir / "framework_out" / "Headers", package_variant=package_variant, - framework_info_macos_file=framework_info_macos_file, ) if args.test: diff --git a/tools/ci_build/github/apple/build_ios_framework.py b/tools/ci_build/github/apple/build_ios_framework.py index 26b97cde2adc8..29df0e7dd2107 100644 --- a/tools/ci_build/github/apple/build_ios_framework.py +++ b/tools/ci_build/github/apple/build_ios_framework.py @@ -27,6 +27,7 @@ def _parse_build_settings(args): build_settings_data = json.load(f) build_settings = {} + build_settings["build_osx_archs"] = build_settings_data.get("build_osx_archs", DEFAULT_BUILD_OSX_ARCHS) if "build_params" in build_settings_data: @@ -81,10 +82,9 @@ def _build_for_ios_sysroot( ort_libs.append(os.path.join(framework_dir, "onnxruntime")) # We only need to copy Info.plist, framework_info.json, and headers once since they are the same - framework_info_json_file_name = "framework_info_macos.json" if sysroot == "macosx" else "framework_info.json" if not info_plist_path: info_plist_path = os.path.join(build_dir_current_arch, build_config, "Info.plist") - framework_info_path = os.path.join(build_dir_current_arch, build_config, framework_info_json_file_name) + framework_info_path = os.path.join(build_dir_current_arch, build_config, "framework_info.json") headers = glob.glob(os.path.join(framework_dir, "Headers", "*.h")) # manually create the fat framework @@ -144,8 +144,7 @@ def _build_package(args): framework_dirs.append(framework_dir) # podspec and headers for each sysroot are the same, pick one of them if not framework_info_path: - framework_info_json_file_name = "framework_info_macos.json" if sysroot == "macosx" else "framework_info.json" - framework_info_path = os.path.join(os.path.dirname(framework_dir), framework_info_json_file_name) + framework_info_path = os.path.join(os.path.dirname(framework_dir), "framework_info.json") public_headers_path = os.path.join(os.path.dirname(framework_dir), "onnxruntime.framework", "Headers") # create the folder for xcframework and copy the LICENSE and podspec file diff --git a/tools/ci_build/github/apple/c/assemble_c_pod_package.py b/tools/ci_build/github/apple/c/assemble_c_pod_package.py index 0f61479103a6d..da9b64216c9fb 100644 --- a/tools/ci_build/github/apple/c/assemble_c_pod_package.py +++ b/tools/ci_build/github/apple/c/assemble_c_pod_package.py @@ -53,7 +53,6 @@ def assemble_c_pod_package( :param public_headers_dir Path to the public headers directory to include in the pod. :param framework_dir Path to the onnxruntime framework directory to include in the pod. :param package_variant The pod package variant. - :param Optional framework_info_macos_file Path to the framework_info_macos.json file containing additional values for the podspec. :return Tuple of (package name, path to the podspec file). """ staging_dir = staging_dir.resolve() @@ -87,7 +86,7 @@ def assemble_c_pod_package( "ORT_C_HEADERS_DIR": public_headers_dir.name, "SUMMARY": pod_config["summary"], "VERSION": pod_version, - "WEAK_FRAMEWORK": framework_info["macosx"]["WEAK_FRAMEWORK"], + "WEAK_FRAMEWORK": framework_info["iphoneos"]["WEAK_FRAMEWORK"], } podspec_template = _script_dir / "c.podspec.template"