Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-24.04, python: "3.14t", ffmpeg: "8.0.1", extras: true}
- {os: ubuntu-24.04, python: "3.12", ffmpeg: "8.0.1", extras: true}
- {os: ubuntu-24.04, python: "pypy3.10", ffmpeg: "8.0.1"}
- {os: macos-14, python: "3.10", ffmpeg: "8.0.1"}
# - {os: ubuntu-24.04, python: "pypy3.11", ffmpeg: "8.0.1"}
- {os: macos-14, python: "3.11", ffmpeg: "8.0.1"}

env:
PYAV_PYTHON: python${{ matrix.config.python }}
Expand Down Expand Up @@ -122,7 +121,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, python: "3.10", ffmpeg: "latest"}
- {os: windows-latest, python: "3.11", ffmpeg: "latest"}

steps:
- name: Checkout
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
arch: AMD64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"
- name: Set Minimum MacOS Target
if: runner.os == 'macOS'
run: |
Expand All @@ -61,10 +61,9 @@ jobs:
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
CIBW_SKIP: "pp*"
CIBW_SKIP: "pp* cp312* cp313* cp314*"
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_ENABLE: cpython-freethreading
run: |
pip install cibuildwheel delvewheel
cibuildwheel --output-dir dist
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
{name = "WyattBlue", email = "wyattblue@auto-editor.com"},
{name = "Jeremy Lainé", email = "jeremy.laine@m4x.org"},
]
requires-python = ">=3.10"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand All @@ -20,7 +20,6 @@ classifiers = [
"Operating System :: Unix",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Cython",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
"swresample",
]

if sys.implementation.name == "cpython":
py_limited_api = True
options = {"bdist_wheel": {"py_limited_api": "cp311"}}
else:
py_limited_api = False
options = {}

# Monkey-patch Cython to not overwrite embedded signatures.
old_embed_signature = EmbedSignature._embed_signature
Expand Down Expand Up @@ -142,6 +148,8 @@ def parse_cflags(raw_flags):
include_dirs=[f"{IMPORT_NAME}/filter"] + extension_extra["include_dirs"],
libraries=extension_extra["libraries"],
library_dirs=extension_extra["library_dirs"],
define_macros=[("Py_LIMITED_API", 0x030B0000)],
py_limited_api=py_limited_api,
)

compiler_directives = {
Expand Down Expand Up @@ -186,6 +194,8 @@ def parse_cflags(raw_flags):
libraries=extension_extra["libraries"],
library_dirs=extension_extra["library_dirs"],
sources=[pyx_path],
define_macros=[("Py_LIMITED_API", 0x030B0000)],
py_limited_api=py_limited_api,
),
compiler_directives=compiler_directives,
build_dir="src",
Expand All @@ -202,4 +212,5 @@ def parse_cflags(raw_flags):
packages=find_packages(include=[f"{IMPORT_NAME}*"]),
package_data=package_data,
ext_modules=ext_modules,
options=options,
)
Loading