Files
pybind11/tests/env.py
Henry Schreiner 23c59b6e3d ci: add android test (#5714)
* ci: add android test

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Fix Android tests (#23)

* Android tests working

* Clarifications

* ci: only use fork on Android

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* ci: add wheel (missing)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* ci: no patchelf?

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* ci: forgot pyproject android mention

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Fix GHA configuration

* Update to cibuildwheel 3.1

* Restore installation of "wheel"

* Revert iOS to cibuildwheel 3.0

* Actually revert iOS back to cibuildwheel 3.0

* Restore iOS to cibuildwheel 3.1, and skip Python 3.14 instead

* Update .github/workflows/tests-cibw.yml

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-08-06 22:32:45 -04:00

38 lines
1.3 KiB
Python

from __future__ import annotations
import platform
import sys
import sysconfig
import pytest
ANDROID = sys.platform.startswith("android")
LINUX = sys.platform.startswith("linux")
MACOS = sys.platform.startswith("darwin")
WIN = sys.platform.startswith("win32") or sys.platform.startswith("cygwin")
CPYTHON = platform.python_implementation() == "CPython"
PYPY = platform.python_implementation() == "PyPy"
GRAALPY = sys.implementation.name == "graalpy"
_graalpy_version = (
sys.modules["__graalpython__"].get_graalvm_version() if GRAALPY else "0.0.0"
)
GRAALPY_VERSION = tuple(int(t) for t in _graalpy_version.split("-")[0].split(".")[:3])
PY_GIL_DISABLED = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
def deprecated_call():
"""
pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
This is a narrowed reimplementation of the following PR :(
https://github.com/pytest-dev/pytest/pull/4104
"""
# TODO: Remove this when testing requires pytest>=3.9.
pieces = pytest.__version__.split(".")
pytest_major_minor = (int(pieces[0]), int(pieces[1]))
if pytest_major_minor < (3, 9):
return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
return pytest.deprecated_call()