diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8d312d..0db2bbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -196,6 +196,11 @@ jobs: # packaging needed by glib python3 -m pip install --break-system-packages license-expression \ packaging + - name: Install Python (macOS) + if: matrix.os == 'macos' + uses: actions/setup-python@v6 + with: + python-version: '3.14' - name: Download source tarball uses: actions/download-artifact@v6 with: diff --git a/artifacts/python/README.md b/artifacts/python/README.md index 026f9e2..f5b9b53 100644 --- a/artifacts/python/README.md +++ b/artifacts/python/README.md @@ -20,17 +20,13 @@ of OpenSlide. Install with `pip install openslide-bin`. OpenSlide Python ≥ 1.4.0 will automatically find openslide-bin and use it. -openslide-bin is available for Python 3.9+ on the following platforms: +openslide-bin is available for Python 3.10+ on the following platforms: - Linux aarch64 and x86_64 with glibc 2.28+ (Debian, Fedora, RHEL 8+, Ubuntu, many others) - macOS 11+ (arm64 and x86_64) - Windows 10+ and Windows Server 2016+ (x64) -pip older than 20.3 cannot install openslide-bin, claiming that it `is not a -supported wheel on this platform`. On platforms with these versions of pip -(RHEL 8), upgrade pip first with `pip install --upgrade pip`. - ## Using Use OpenSlide via [OpenSlide Python][]. The OpenSlide Python diff --git a/artifacts/python/pyproject.in.toml b/artifacts/python/pyproject.in.toml index 3eb2e0f..14a4116 100644 --- a/artifacts/python/pyproject.in.toml +++ b/artifacts/python/pyproject.in.toml @@ -19,7 +19,6 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -28,7 +27,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Bio-Informatics", "Typing :: Typed", ] -requires-python = ">= 3.9" +requires-python = ">= 3.10" [project.urls] Homepage = "https://openslide.org/" diff --git a/bintool b/bintool index 4590c1f..5b9e3fd 100755 --- a/bintool +++ b/bintool @@ -35,6 +35,7 @@ import platform import shutil import subprocess import sys +import sysconfig import tarfile from tempfile import TemporaryDirectory from typing import Any, BinaryIO, Self @@ -534,14 +535,17 @@ class WheelSmokeTester(SmokeTester): def _unpack(self, dir: Path) -> None: log('Creating virtualenv') - # /usr/bin/python3 on macOS because sys.executable may not be a - # universal binary - python = ( - '/usr/bin/python3' if self._system == 'macos' else sys.executable - ) + if ( + self._system == 'macos' + and '-universal2' not in sysconfig.get_platform() + ): + raise Exception( + 'Testing macOS wheels requires bintool to be run with a ' + 'Python built as a universal binary' + ) # resolve 8.3 shortname of tempdir to avoid venv warning on Windows # https://github.com/python/cpython/issues/90329 - subprocess.check_call([python, '-m', 'venv', dir.resolve()]) + subprocess.check_call([sys.executable, '-m', 'venv', dir.resolve()]) if self._update_pip: subprocess.check_call( [