# Copyright (c) 2021-2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# MIT License
#
# Modifications Copyright (C) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

[build-system]
build-backend = "setuptools.build_meta"
requires = [
    "cmake>=3.26.4",
    "hip-python-as-cuda>=6.4.0",
    "hip-python>=6.4.0",
    "cython>=3.0.0",
    "ninja",
    "scikit-build>=0.13.1",
    "setuptools>=61.0.0",
    "tomli",
    "wheel",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.

[project]
name = "amd-hipmm"
dynamic = ["version"]
description = "hipMM - Memory Manager for AMD GPUs"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
    { name = "Advanced Micro Devices, Inc." },
    { name = "NVIDIA Corporation" },
]
license = { text = "Apache 2.0 AND MIT" }
requires-python = ">=3.9"
dependencies = [
    "numba-hip",
    "numba>=0.57,<0.61",
    "numpy>=1.21",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
classifiers = [
    "Intended Audience :: Developers",
    "Topic :: Database",
    "Topic :: Scientific/Engineering",
    "License :: OSI Approved :: Apache Software License",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
]

[project.optional-dependencies]
test = [
    "pytest",
    "pytest-cov",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.

# NOTE: If one of the below optional keys is specified, pip will
#       install a numba-hip version that is compatible with the
#       respective ROCm version.
rocm-6-3-0 = ["numba-hip[rocm-6-3-0]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-2-4 = ["numba-hip[rocm-6-2-4]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-2-3 = ["numba-hip[rocm-6-2-3]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-2-2 = ["numba-hip[rocm-6-2-2]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-2-1 = ["numba-hip[rocm-6-2-1]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-2-0 = ["numba-hip[rocm-6-2-0]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-1-2 = ["numba-hip[rocm-6-1-2]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-1-0 = ["numba-hip[rocm-6-1-0]@git+https://github.com/ROCm/numba-hip.git"]
rocm-6-0-0 = ["numba-hip[rocm-6-0-0]@git+https://github.com/ROCm/numba-hip.git"]

[project.urls]
Homepage = "https://github.com/rocm/hipmm"

[tool.black]
line-length = 79
target-version = ["py39"]
include = '\.py?$'
exclude = '''
/(
    thirdparty |
    \.eggs |
    \.git |
    \.hg |
    \.mypy_cache |
    \.tox |
    \.venv |
    _build |
    buck-out |
    build |
    dist
)/
'''

[tool.isort]
line_length = 79
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
combine_as_imports = true
order_by_type = true
known_first_party = ["rmm"]
default_section = "THIRDPARTY"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
skip = [
    "thirdparty",
    ".eggs",
    ".git",
    ".hg",
    ".mypy_cache",
    ".tox",
    ".venv",
    "_build",
    "buck-out",
    "build",
    "dist",
    "__init__.py",
]

[tool.setuptools]
license-files = ["LICENSE"]

[tool.setuptools.dynamic]
version = { file = "rmm/VERSION" }
