# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

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

[project]
name = "cvcuda-cu${CUDA_VERSION_MAJOR}"
version = "${CMAKE_PROJECT_VERSION}${PROJECT_VERSION_SUFFIX}"
description = "${CMAKE_PROJECT_DESCRIPTION}"
readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "Apache-2.0"}
authors = [
    {name = "NVIDIA Corporation", email = "support@nvidia.com"}
]
maintainers = [
    {name = "NVIDIA Corporation", email = "support@nvidia.com"}
]
keywords = ["cuda", "computer-vision", "image-processing", "nvidia", "gpu"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Environment :: GPU :: NVIDIA CUDA",
    "Environment :: GPU :: NVIDIA CUDA :: ${CUDA_VERSION_MAJOR}",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: POSIX :: Linux",
    "Programming Language :: C++",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Scientific/Engineering",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Scientific/Engineering :: Image Processing",
    "Topic :: Software Development :: Libraries",
]
requires-python = ">=3.9, <3.15"
dependencies = [
    "numpy>=1.23.5",
]

[project.urls]
Homepage = "https://cvcuda.github.io"
Documentation = "https://cvcuda.github.io"
Repository = "https://github.com/CVCUDA/CV-CUDA"
"Bug Tracker" = "https://github.com/CVCUDA/CV-CUDA/issues"
Changelog = "https://github.com/CVCUDA/CV-CUDA/releases"

[project.optional-dependencies]
dev = [
    "pytest>=7.0",
    "black>=22.0",
    "flake8>=4.0",
]

[tool.setuptools]
zip-safe = false
include-package-data = true
# Custom build handled by CMake, not setuptools
script-files = []

[tool.setuptools.packages.find]
include = ["cvcuda*"]
where = ["."]

[tool.setuptools.package-data]
cvcuda = ["*.so"]
"cvcuda_cu${CUDA_VERSION_MAJOR}.libs" = ["*.*"]

[tool.black]
line-length = 100
target-version = ["py39", "py310", "py311", "py312", "py313", "py314"]
include = '\.pyi?$'

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "-v",
    "--tb=short",
    "--strict-markers",
]
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
    "gpu: marks tests that require GPU",
]

# Note: This package uses CMake for the actual C++/CUDA compilation.
# The Python packaging system (setuptools) only packages pre-built binaries.
# To build from source, you must first build with CMake:
#   cmake -B build-rel -DCMAKE_BUILD_TYPE=Release
#   cmake --build build-rel --target wheel
# The resulting wheel can then be installed with pip.
