Skip to content

Commit

Permalink
Try using ffmpeg 6.0 wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Oct 21, 2023
1 parent 34de59f commit 77136a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@ on:
- '**.txt'
jobs:
style:
name: "${{ matrix.config.suite }}"
name: "Style"
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {suite: black}
- {suite: flake8}
- {suite: isort}
env:
PYAV_PYTHON: python3
PYAV_LIBRARY: ffmpeg-6.0
Expand All @@ -39,10 +33,12 @@ jobs:
. scripts/activate.sh
python -m pip install black flake8 isort
- name: "${{ matrix.config.suite }}"
- name: "Test Style"
run: |
. scripts/activate.sh
./scripts/test ${{ matrix.config.suite }}
./scripts/test black
./scripts/test flake8
./scripts/test isort
nix:
name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}"
Expand Down Expand Up @@ -129,8 +125,6 @@ jobs:
setuptools
if [[ "${{ matrix.config.ffmpeg }}" == "5.1" ]]; then
curl -L -o ffmpeg.tar.gz https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.1.2-1/ffmpeg-win_amd64.tar.gz
elif [[ "${{ matrix.config.ffmpeg }}" == "5.0" ]]; then
curl -L -o ffmpeg.tar.gz https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.0.1-1/ffmpeg-win_amd64.tar.gz
else
conda install -q -n pyav ffmpeg=${{ matrix.config.ffmpeg }}
fi
Expand Down
15 changes: 9 additions & 6 deletions scripts/fetch-vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@
import subprocess


def get_platform():
def get_url():
system = platform.system()
machine = platform.machine()

if system == "Linux":
return f"manylinux_{machine}"
plat = f"manylinux_{machine}"

if system == "Darwin":
# cibuildwheel sets ARCHFLAGS:
# https://github.com/pypa/cibuildwheel/blob/5255155bc57eb6224354356df648dc42e31a0028/cibuildwheel/macos.py#L207-L220
if "ARCHFLAGS" in os.environ:
machine = os.environ["ARCHFLAGS"].split()[1]
return f"macosx_{machine}"
plat = f"macosx_{machine}"

if system == "Linux" or system == "Darwin":
return f"https://github.com/WyattBlue/pyav-ffmpeg/releases/download/6.0-1/ffmpeg-{plat}.tar.gz"

if system == "Windows":
return "win_amd64" if calcsize("P") * 8 == 64 else "win32"
plat = "win_amd64" if calcsize("P") * 8 == 64 else "win32"
return f"https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.1.2-1/ffmpeg-{plat}.tar.gz"

raise Exception(f"Unsupported system {system}")

Expand All @@ -36,8 +40,7 @@ def get_platform():
shutil.rmtree(args.destination_dir)
os.makedirs(args.destination_dir)

tarball_url = f"https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.1.2-1/ffmpeg-{get_platform()}.tar.gz"

tarball_url = get_url()
tarball_name = tarball_url.split("/")[-1]
tarball_file = os.path.join(args.cache_dir, tarball_name)

Expand Down

0 comments on commit 77136a6

Please sign in to comment.