From f07af194f571fb838a566abb3ce8b7f5316b6832 Mon Sep 17 00:00:00 2001 From: Joe Schiff <41972063+JoeSchiff@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:44:25 -0500 Subject: [PATCH] Update cibuildpkg.py --- scripts/cibuildpkg.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/cibuildpkg.py b/scripts/cibuildpkg.py index 62e19594..f16db553 100644 --- a/scripts/cibuildpkg.py +++ b/scripts/cibuildpkg.py @@ -105,6 +105,20 @@ def run(cmd, env=None): print(f"stderr: {e.stderr}") raise e +def correct_configure(): + file_path = "D:/a/pyav-ffmpeg/pyav-ffmpeg/build/ffmpeg/configure" + old_string = 'test_cmd $pkg_config --exists --print-errors $pkg_version || return' + new_string = 'test_cmd $pkg_config --exists --print-errors "$pkg_version" || return' + + with open(file_path, 'r') as file: + content = file.read() + + updated_content = content.replace(old_string, new_string) + + with open(file_path, 'w') as file: + file.write(updated_content) + print("correct_configure complete") + @dataclass class Package: @@ -220,6 +234,9 @@ def _build_with_autoconf(self, package: Package, for_builder: bool) -> None: elif platform.system() == "Windows": configure_args += ["--target=x86_64-win64-gcc"] + if package.name == "ffmpeg" and platform.system() == "Windows": + correct_configure() + # build package os.makedirs(package_build_path, exist_ok=True) with chdir(package_build_path):