diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea19bdfb13..e9232a475a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -335,7 +335,7 @@ jobs: # We need to fuse our own universal2 wheels for curl_cffi python3 -m pip install -U 'delocate==0.11.0' mkdir curl_cffi_whls curl_cffi_universal2 - python3 devscripts/install_deps.py --print --omit-default --include-extra curl-cffi > requirements.txt + python3 devscripts/install_deps.py --print --omit-default --include-extra build-curl-cffi > requirements.txt for platform in "macosx_11_0_arm64" "macosx_11_0_x86_64"; do python3 -m pip download \ --only-binary=:all: \ @@ -464,7 +464,7 @@ jobs: if ("${Env:ARCH}" -eq "x86") { python devscripts/install_deps.py } else { - python devscripts/install_deps.py --include-extra curl-cffi + python devscripts/install_deps.py --include-extra build-curl-cffi } - name: Prepare diff --git a/bundle/docker/linux/build.sh b/bundle/docker/linux/build.sh index d6d1791865..00dedaca75 100755 --- a/bundle/docker/linux/build.sh +++ b/bundle/docker/linux/build.sh @@ -20,7 +20,7 @@ INCLUDES=( ) if [[ -z "${EXCLUDE_CURL_CFFI:-}" ]]; then - INCLUDES+=(--include-extra curl-cffi) + INCLUDES+=(--include-extra build-curl-cffi) fi runpy -m venv /yt-dlp-build-venv diff --git a/pyproject.toml b/pyproject.toml index 5827629965..96c69bf8e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,11 @@ default = [ "yt-dlp-ejs==0.3.2", ] curl-cffi = [ - "curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.14; implementation_name=='cpython'", + "curl-cffi>=0.5.10,!=0.6.*,!=0.7.*,!=0.8.*,!=0.9.*,<0.15; implementation_name=='cpython'", +] +build-curl-cffi = [ + "curl-cffi==0.13.0; sys_platform=='darwin' or (sys_platform=='linux' and platform_machine!='armv7l')", + "curl-cffi==0.14.0; sys_platform=='win32' or (sys_platform=='linux' and platform_machine=='armv7l')", ] secretstorage = [ "cffi", diff --git a/yt_dlp/networking/_curlcffi.py b/yt_dlp/networking/_curlcffi.py index e6baf48780..88354f7095 100644 --- a/yt_dlp/networking/_curlcffi.py +++ b/yt_dlp/networking/_curlcffi.py @@ -33,9 +33,9 @@ if curl_cffi is None: curl_cffi_version = tuple(map(int, re.split(r'[^\d]+', curl_cffi.__version__)[:3])) -if curl_cffi_version != (0, 5, 10) and not (0, 10) <= curl_cffi_version < (0, 14): +if curl_cffi_version != (0, 5, 10) and not (0, 10) <= curl_cffi_version < (0, 15): curl_cffi._yt_dlp__version = f'{curl_cffi.__version__} (unsupported)' - raise ImportError('Only curl_cffi versions 0.5.10, 0.10.x, 0.11.x, 0.12.x, 0.13.x are supported') + raise ImportError('Only curl_cffi versions 0.5.10 and 0.10.x through 0.14.x are supported') import curl_cffi.requests from curl_cffi.const import CurlECode, CurlOpt