@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / a02c86b4dd
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 23:30 UTC

[CI/Build] migrate static project metadata from setup.py to pyproject.toml (#8772)

Daniele committed Feb 18, 2025 at 17:02 UTC a02c86b4dd00f096b33499657f2d119be91cc9a6
2 files changed +39 -48
pyproject.toml
+35 -1
@@ -12,8 +12,42 @@ requires = [
12 ]
13 build-backend = "setuptools.build_meta"
14
15 +[project]
16 +name = "vllm"
17 +authors = [{name = "vLLM Team"}]
18 +license = { "file"= "LICENSE" }
19 +readme = "README.md"
20 +description = "A high-throughput and memory-efficient inference and serving engine for LLMs"
21 +classifiers = [
22 + "Programming Language :: Python :: 3.9",
23 + "Programming Language :: Python :: 3.10",
24 + "Programming Language :: Python :: 3.11",
25 + "Programming Language :: Python :: 3.12",
26 + "License :: OSI Approved :: Apache Software License",
27 + "Intended Audience :: Developers",
28 + "Intended Audience :: Information Technology",
29 + "Intended Audience :: Science/Research",
30 + "Topic :: Scientific/Engineering :: Artificial Intelligence",
31 + "Topic :: Scientific/Engineering :: Information Analysis",
32 +]
33 +requires-python = ">=3.9"
34 +dynamic = [ "version", "dependencies", "optional-dependencies"]
35 +
36 +[project.urls]
37 +Homepage="https://github.com/vllm-project/vllm"
38 +Documentation="https://vllm.readthedocs.io/en/latest/"
39 +Slack="http://slack.vllm.ai/"
40 +
41 +[project.scripts]
42 +vllm = "vllm.entrypoints.cli.main:main"
43 +
44 [tool.setuptools_scm]
16 -# version_file = "vllm/_version.py" # currently handled by `setup.py:get_version()`
45 +version_file = "vllm/_version.py"
46 +
47 +[tool.setuptools.packages.find]
48 +where = ["."]
49 +exclude = ["benchmarks", "csrc", "docs", "examples", "tests*"]
50 +namespaces = false
51
52 [tool.yapfignore]
53 ignore_patterns = [
setup.py
+4 -47
@@ -13,7 +13,7 @@ from typing import Dict, List
13
14 import torch
15 from packaging.version import Version, parse
16 -from setuptools import Extension, find_packages, setup
16 +from setuptools import Extension, setup
17 from setuptools.command.build_ext import build_ext
18 from setuptools_scm import get_version
19 from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
@@ -499,9 +499,7 @@ def get_gaudi_sw_version():
499
500
501 def get_vllm_version() -> str:
502 - version = get_version(
503 - write_to="vllm/_version.py", # TODO: move this to pyproject.toml
504 - )
502 + version = get_version()
503 sep = "+" if "+" not in version else "." # dev versions might contain +
504
505 if _no_device():
@@ -549,16 +547,6 @@ def get_vllm_version() -> str:
547 return version
548
549
552 -def read_readme() -> str:
553 - """Read the README file if present."""
554 - p = get_path("README.md")
555 - if os.path.isfile(p):
556 - with open(get_path("README.md"), encoding="utf-8") as f:
557 - return f.read()
558 - else:
559 - return ""
560 -
561 -
550 def get_requirements() -> List[str]:
551 """Get Python package dependencies from requirements.txt."""
552
@@ -649,36 +637,10 @@ else:
637 }
638
639 setup(
652 - name="vllm",
640 + # static metadata should rather go in pyproject.toml
641 version=get_vllm_version(),
654 - author="vLLM Team",
655 - license="Apache 2.0",
656 - description=("A high-throughput and memory-efficient inference and "
657 - "serving engine for LLMs"),
658 - long_description=read_readme(),
659 - long_description_content_type="text/markdown",
660 - url="https://github.com/vllm-project/vllm",
661 - project_urls={
662 - "Homepage": "https://github.com/vllm-project/vllm",
663 - "Documentation": "https://vllm.readthedocs.io/en/latest/",
664 - },
665 - classifiers=[
666 - "Programming Language :: Python :: 3.9",
667 - "Programming Language :: Python :: 3.10",
668 - "Programming Language :: Python :: 3.11",
669 - "Programming Language :: Python :: 3.12",
670 - "License :: OSI Approved :: Apache Software License",
671 - "Intended Audience :: Developers",
672 - "Intended Audience :: Information Technology",
673 - "Intended Audience :: Science/Research",
674 - "Topic :: Scientific/Engineering :: Artificial Intelligence",
675 - "Topic :: Scientific/Engineering :: Information Analysis",
676 - ],
677 - packages=find_packages(exclude=("benchmarks", "csrc", "docs", "examples",
678 - "tests*")),
679 - python_requires=">=3.9",
680 - install_requires=get_requirements(),
642 ext_modules=ext_modules,
643 + install_requires=get_requirements(),
644 extras_require={
645 "tensorizer": ["tensorizer>=2.9.0"],
646 "runai": ["runai-model-streamer", "runai-model-streamer-s3", "boto3"],
@@ -687,9 +649,4 @@ setup(
649 },
650 cmdclass=cmdclass,
651 package_data=package_data,
690 - entry_points={
691 - "console_scripts": [
692 - "vllm=vllm.entrypoints.cli.main:main",
693 - ],
694 - },
652 )