[build-system]
requires = ["setuptools>=77.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "sabctools"
dynamic = ["version"]
description = "C implementations of functions for use within SABnzbd"
readme = "README.md"
authors = [
    {name = "Safihre", email = "safihre@sabnzbd.org"},
]
requires-python = ">=3.10"
license = "GPL-2.0-or-later"
license-files = ["LICENSE.md"]
classifiers = [
    "Programming Language :: Python",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: C++",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: Unix",
    "Operating System :: MacOS",
    "Development Status :: 5 - Production/Stable",
    "Environment :: Plugins",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Communications :: Usenet News",
]

[project.urls]
Homepage = "https://github.com/sabnzbd/sabctools/"
Source = "https://github.com/sabnzbd/sabctools/"
Issues = "https://github.com/sabnzbd/sabctools/issues"

[dependency-groups]
test = [
    "pytest",
    "chardet",
    "jaraco.functools",
    "portend"
]

[tool.black]
line-length = 120
target-version = ['py310']
include = '(?:src|tests)\/.*\.pyi?'

[tool.cibuildwheel]
skip = "*i686* *t-*"
test-skip = "*"

[tool.cibuildwheel.linux]
archs = ["native"]

[tool.cibuildwheel.macos]
archs = ["universal2"]
build = "cp314-*"

[tool.cibuildwheel.windows]
archs = ["native"]
build = "cp314-*"
# Skip wheel repair: SABnzbd already bundles the required runtime DLLs
repair-wheel-command = ""

[tool.setuptools]
packages = ["sabctools"]
package-dir = {"sabctools" = "src"}
include-package-data = false
