[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "medius"
version = "2.2.1"
description = "Python bindings for the medius transparent mouse passthrough box"
requires-python = ">=3.8"
license = { text = "MIT" }
authors = [{ name = "medius" }]
keywords = ["medius", "mouse", "hid", "serial", "makcu"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Rust",
"Topic :: System :: Hardware",
]
[project.urls]
Homepage = "https://github.com/K4HVH/medius"
[project.optional-dependencies]
test = ["pytest"]
[tool.hatch.build.targets.wheel]
packages = ["medius"]
pure-python = false
artifacts = [
"medius/libmedius_capi.so",
"medius/libmedius_capi.dylib",
"medius/medius_capi.dll",
]
[tool.hatch.build.hooks.custom]
path = "hatch_build.py"
[tool.hatch.build.targets.sdist]
include = ["medius", "hatch_build.py", "pyproject.toml"]
[tool.cibuildwheel]
build = "cp310-manylinux_* cp310-macosx_* cp310-win_amd64"
build-frontend = "build"
test-command = "python -c \"import medius; print(medius.abi_version(), medius.version_string())\""
[tool.cibuildwheel.linux]
before-all = "(yum install -y systemd-devel pkgconfig || dnf install -y systemd-devel pkgconfig) && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal"
environment = { PATH = "$HOME/.cargo/bin:$PATH" }
[tool.cibuildwheel.macos]
before-all = "rustup toolchain install stable --profile minimal || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal"
[tool.cibuildwheel.windows]
before-all = "rustup toolchain install stable --profile minimal"