# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
#
# This file must always match that of responses_api_models/local_vllm_model/setup.py
from sys import platform

import setuptools

dependencies = [
    "nemo-gym[dev]",

    # We specifically pin the vllm dependency because we have tested on this version.
    # Updated Tue Jun 23, 2026 with vllm==0.20.0
    # License: Apache 2.0 https://github.com/vllm-project/vllm/blob/88d34c6409e9fb3c7b8ca0c04756f061d2099eb1/LICENSE
    # "vllm==0.20.0",
    # VLLM is resolved below since installation on Macs requires special workarounds.

    # hf_transfer for faster model download from HuggingFace
    # Updated Mon Jan 05, 2026 with vllm==0.1.9
    # License: Apache 2.0 https://github.com/huggingface/hf_transfer/blob/51499cc4ff0fe218082e13f27881a06811913751/LICENSE
    "hf_transfer==0.1.9",

    # uvicorn is used by Gym for server spinup. We have server override logic that depends on this specific version.
    # Updated Wed Jan 07, 2026 with uvicorn==0.40.0
    # License: BSD 3-Clause https://github.com/Kludex/uvicorn/blob/9ff60042a53cd1bbfd5580ab0a91ea2d1d8f2f8c/LICENSE.md
    "uvicorn==0.40.0",

    # hf_transfer is used by vLLM for super fast downloads
    # Updated Tue Feb 24, 2026 with hf_transfer==0.1.9
    # License: Apache 2.0 https://github.com/huggingface/hf_transfer/blob/51499cc4ff0fe218082e13f27881a06811913751/LICENSE
    "hf_transfer",
]

# We use an older version of vllm on Macs since that is the latest version pip-installable. We may need to version tests later on.
if platform == "darwin":
    dependencies.append("vllm==0.11.0")
else:
    dependencies.append("vllm==0.20.0")


setuptools.setup(install_requires=dependencies)
