Skip to content

Commit

Permalink
Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-ferenczi committed Sep 18, 2023
1 parent 99d36d2 commit 9f85bdf
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE
include requirements.txt
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"packaging",
"setuptools",
"aiohttp",
]
63 changes: 63 additions & 0 deletions setup.py
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()
)

0 comments on commit 9f85bdf

Please sign in to comment.