diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed38b91..b281913 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.13' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -38,34 +38,34 @@ jobs: matrix: include: # Python versions - - name: Linux py37 - os: ubuntu-latest - pyversion: '3.7' - - name: Linux py38 - os: ubuntu-latest - pyversion: '3.8' - name: Linux py39 os: ubuntu-latest pyversion: '3.9' - name: Linux py310 os: ubuntu-latest pyversion: '3.10' + - name: Linux py311 + os: ubuntu-latest + pyversion: '3.11' - name: Linux py312 os: ubuntu-latest pyversion: '3.12' + - name: Linux py313 + os: ubuntu-latest + pyversion: '3.13' - name: Linux pypy os: ubuntu-latest pyversion: 'pypy3.9' # OS's - - name: Linux py311 + - name: Linux py313 os: ubuntu-latest - pyversion: '3.11' - - name: Windows py311 + pyversion: '3.13' + - name: Windows py313 os: windows-latest - pyversion: '3.11' - - name: MacOS py311 + pyversion: '3.13' + - name: MacOS py313 os: macos-latest - pyversion: '3.11' + pyversion: '3.13' steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.pyversion }} diff --git a/imageio_ffmpeg/_definitions.py b/imageio_ffmpeg/_definitions.py index 9f6e39c..801fb1d 100644 --- a/imageio_ffmpeg/_definitions.py +++ b/imageio_ffmpeg/_definitions.py @@ -1,25 +1,27 @@ import platform import struct -import sys __version__ = "0.5.1" def get_platform(): bits = struct.calcsize("P") * 8 - if sys.platform.startswith("linux"): + if platform.system().lower().startswith("linux"): architecture = platform.machine() if architecture == "aarch64": return "linuxaarch64" return "linux{}".format(bits) - elif sys.platform.startswith("freebsd"): + elif platform.system().lower().startswith("freebsd"): return "freebsd{}".format(bits) - elif sys.platform.startswith("win"): + elif platform.system().lower().startswith("win"): return "win{}".format(bits) - elif sys.platform.startswith("cygwin"): + elif platform.system().lower().startswith("cygwin"): return "win{}".format(bits) - elif sys.platform.startswith("darwin"): - return "osx{}".format(bits) + elif platform.system().lower().startswith("darwin"): + if platform.processor().lower().startswith("arm"): # Apple Silicon + return "osx-arm{}".format(bits) + else: + return "osx-{}".format(bits) else: # pragma: no cover return None @@ -34,7 +36,8 @@ def get_platform(): # Platform string -> ffmpeg filename FNAME_PER_PLATFORM = { - "osx64": "ffmpeg-osx64-v4.2.2", # 10.10+ + "osx-arm64": "ffmpeg-osx-arm64-v7.0", # Apple Silicon + "osx64": "ffmpeg-osx-x86-v7.0", # 10.9+ "win32": "ffmpeg-win32-v4.2.2.exe", # Windows 7+ "win64": "ffmpeg-win64-v4.2.2.exe", # "linux32": "ffmpeg-linux32-v4.2.2", @@ -42,13 +45,15 @@ def get_platform(): "linuxaarch64": "ffmpeg-linuxaarch64-v4.2.2", } -osxplats = "macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64" +osxplats = "macosx_10_9_intel.macosx_10_9_x86_64" +osxarmplats = "macosx_11_0_arm64" # Wheel tag -> platform string WHEEL_BUILDS = { "py3-none-manylinux2010_x86_64": "linux64", "py3-none-manylinux2014_aarch64": "linuxaarch64", - "py3-none-" + osxplats: "osx64", + "py3-none-" + osxplats: "osx64", # Apple Intel + "py3-none-" + osxarmplats: "osx-arm64", # Apple Silicon "py3-none-win32": "win32", "py3-none-win_amd64": "win64", } diff --git a/setup.py b/setup.py index ee6b492..24fb6bd 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ long_description=long_description, platforms="any", provides=["imageio_ffmpeg"], - python_requires=">=3.5", + python_requires=">=3.9", setup_requires=[], install_requires=[], packages=["imageio_ffmpeg", "imageio_ffmpeg.binaries"], @@ -74,11 +74,10 @@ "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], )