diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e4c221d9..dba278f7f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.8" + - name: Compile Time + run: python scripts/comptime.py 6.1 - name: Build source package run: | pip install cython @@ -53,14 +55,20 @@ jobs: run: | brew update brew install pkg-config - - name: Set deployment target + - name: Anon1 if: matrix.os == 'macos-13' || matrix.os == 'macos-14' - run: echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV + run: | + echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV + python scripts/comptime.py 7 + - name: Anon2 + if: matrix.os != 'macos-13' && matrix.os != 'macos-14' + run: python scripts/comptime.py 6.1 - name: Build wheels env: CIBW_ARCHS: ${{ matrix.arch }} CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.1.json /tmp/vendor + CIBW_BEFORE_BUILD_MACOS: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.0.json /tmp/vendor CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-6.1.json C:\cibw\vendor CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names diff --git a/scripts/comptime.py b/scripts/comptime.py index 797d125e0..a03a465f9 100644 --- a/scripts/comptime.py +++ b/scripts/comptime.py @@ -20,10 +20,12 @@ def process_directory(directory): file_path = os.path.join(root, file) replace_in_file(file_path) -if sys.platform == "win32": + +version = os.environ.get("PYAV_LIBRARY") +if version is None: is_6 = sys.argv[1].startswith("6") else: - is_6 = os.environ.get("PYAV_LIBRARY").startswith("ffmpeg-6") + is_6 = version.startswith("ffmpeg-6") if is_6: process_directory("av")