Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions artifacts/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions artifacts/python/pyproject.in.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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/"
Expand Down
16 changes: 10 additions & 6 deletions bintool
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
[
Expand Down