-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99d36d2
commit 9f85bdf
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include LICENSE | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build-system] | ||
requires = [ | ||
"packaging", | ||
"setuptools", | ||
"aiohttp", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import io | ||
import os | ||
import re | ||
from typing import List | ||
|
||
import setuptools | ||
|
||
SETUP_DIR = os.path.dirname(__file__) | ||
|
||
|
||
def get_path(*filepath) -> str: | ||
return os.path.join(SETUP_DIR, *filepath) | ||
|
||
|
||
def find_version(filepath: str): | ||
"""Extract version information from the given filepath. | ||
Adapted from https://github.com/ray-project/ray/blob/0b190ee1160eeca9796bc091e07eaebf4c85b511/python/setup.py | ||
""" | ||
with open(filepath) as fp: | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", fp.read(), re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
def read_readme() -> str: | ||
"""Read the README file.""" | ||
return io.open(get_path("README.md"), "r", encoding="utf-8").read() | ||
|
||
|
||
def get_requirements() -> List[str]: | ||
"""Get Python package dependencies from requirements.txt.""" | ||
with open(get_path("requirements.txt")) as f: | ||
requirements = f.read().strip().split("\n") | ||
return requirements | ||
|
||
|
||
setuptools.setup( | ||
name="vllm_client", | ||
version=find_version(get_path("vllm_client", "__init__.py")), | ||
author="vLLM Team", | ||
license="Apache 2.0", | ||
description=("Client for the vLLM API with minimal dependencies"), | ||
long_description=read_readme(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/vllm-project/vllm", | ||
project_urls={ | ||
"Homepage": "https://github.com/vllm-project/vllm", | ||
"Documentation": "https://vllm.readthedocs.io/en/latest/", | ||
}, | ||
classifiers=[ | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
], | ||
packages=setuptools.find_packages(exclude=("tests",)), | ||
python_requires=">=3.8", | ||
install_requires=get_requirements() | ||
) |