91e75e620b
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
"""Tests for cua-driver wheel build helpers."""
|
|
|
|
import importlib.util
|
|
from pathlib import Path
|
|
|
|
|
|
def load_build_wheel_module():
|
|
module_path = Path(__file__).resolve().parents[1] / "build_wheel.py"
|
|
spec = importlib.util.spec_from_file_location("build_wheel", module_path)
|
|
module = importlib.util.module_from_spec(spec)
|
|
assert spec.loader is not None
|
|
spec.loader.exec_module(module)
|
|
return module
|
|
|
|
|
|
def test_wheel_tags_are_platform_specific():
|
|
build_wheel = load_build_wheel_module()
|
|
|
|
assert build_wheel.get_wheel_tag("darwin", "universal") == "py3-none-macosx_11_0_universal2"
|
|
assert build_wheel.get_wheel_tag("linux", "x86_64") == "py3-none-manylinux_2_31_x86_64"
|
|
assert build_wheel.get_wheel_tag("linux", "arm64") == "py3-none-manylinux_2_31_aarch64"
|
|
assert build_wheel.get_wheel_tag("windows", "x86_64") == "py3-none-win_amd64"
|
|
assert build_wheel.get_wheel_tag("windows", "arm64") == "py3-none-win_arm64"
|
|
|
|
|
|
def test_license_metadata_stays_legacy_upload_compatible():
|
|
pyproject = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
|
pyproject_text = pyproject.read_text()
|
|
|
|
assert 'license = { text = "MIT" }' in pyproject_text
|
|
assert 'license = "MIT"' not in pyproject_text
|