diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9cbdb6715..7098f7cf3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,8 @@ jobs: arch: x86_64 - os: ubuntu-24.04-arm arch: aarch64 + - os: ubuntu-24.04 + arch: armv7l - os: ubuntu-24.04 arch: x86_64 - os: windows-latest @@ -45,6 +47,11 @@ jobs: - uses: actions/setup-python@v6 with: python-version: "3.14" + - name: Set up QEMU + if: matrix.arch == 'armv7l' + uses: docker/setup-qemu-action@v3 + with: + platforms: arm - name: Set Minimum MacOS Target if: runner.os == 'macOS' run: | @@ -67,6 +74,7 @@ jobs: CIBW_SKIP: "cp310-win_arm64" CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av CIBW_TEST_REQUIRES: pytest numpy + CIBW_TEST_SKIP: "*_armv7l" run: | pip install cibuildwheel delvewheel cibuildwheel --output-dir dist diff --git a/av/subtitles/codeccontext.pxd b/av/subtitles/codeccontext.pxd index 01c8fbf1f..0be45ed10 100644 --- a/av/subtitles/codeccontext.pxd +++ b/av/subtitles/codeccontext.pxd @@ -4,4 +4,5 @@ from av.packet cimport Packet cdef class SubtitleCodecContext(CodecContext): cdef bint subtitle_header_set + cpdef decode(self, Packet packet=?) cpdef decode2(self, Packet packet) diff --git a/scripts/fetch-vendor.py b/scripts/fetch-vendor.py index b59ec3b7d..7161a0023 100644 --- a/scripts/fetch-vendor.py +++ b/scripts/fetch-vendor.py @@ -4,6 +4,7 @@ import os import platform import subprocess +import time def get_platform(): @@ -51,3 +52,13 @@ def get_platform(): logging.info(f"Extracting {tarball_name}") subprocess.check_call(["tar", "-C", args.destination_dir, "-xf", tarball_file]) + +# Some tarball members carry pre-1980 mtimes, which the ZIP format (and thus +# delvewheel's wheel repackaging) cannot represent. Bump any such file to now. +ZIP_EPOCH = 315532800 # 1980-01-01 00:00:00 UTC +now = time.time() +for root, _, files in os.walk(args.destination_dir): + for name in files: + path = os.path.join(root, name) + if os.path.getmtime(path) < ZIP_EPOCH: + os.utime(path, (now, now)) diff --git a/scripts/ffmpeg-8.1.json b/scripts/ffmpeg-8.1.json index 76ab6c2e4..715c177bf 100644 --- a/scripts/ffmpeg-8.1.json +++ b/scripts/ffmpeg-8.1.json @@ -1,3 +1,3 @@ { - "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-1/ffmpeg-{platform}.tar.gz" + "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-2/ffmpeg-{platform}.tar.gz" } diff --git a/scripts/ffmpeg-latest.json b/scripts/ffmpeg-latest.json index 76ab6c2e4..715c177bf 100644 --- a/scripts/ffmpeg-latest.json +++ b/scripts/ffmpeg-latest.json @@ -1,3 +1,3 @@ { - "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-1/ffmpeg-{platform}.tar.gz" + "url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-2/ffmpeg-{platform}.tar.gz" } diff --git a/setup.py b/setup.py index 0e00f9873..3a307c4c6 100644 --- a/setup.py +++ b/setup.py @@ -141,6 +141,12 @@ def parse_cflags(raw_flags): IMPORT_NAME = "av" +# Newer compilers treat incompatible pointer types as an error by default; +# downgrade it back to a warning so FFmpeg API churn doesn't break the build. +extra_compile_args = [] +if platform.system() != "Windows": + extra_compile_args.append("-Wno-error=incompatible-pointer-types") + loudnorm_extension = Extension( f"{IMPORT_NAME}.filter.loudnorm", sources=[ @@ -151,6 +157,7 @@ def parse_cflags(raw_flags): libraries=extension_extra["libraries"], library_dirs=extension_extra["library_dirs"], define_macros=define_macros, + extra_compile_args=extra_compile_args, py_limited_api=py_limited_api, ) @@ -197,6 +204,7 @@ def parse_cflags(raw_flags): library_dirs=extension_extra["library_dirs"], sources=[pyx_path], define_macros=define_macros, + extra_compile_args=extra_compile_args, py_limited_api=py_limited_api, ), compiler_directives=compiler_directives,