From c6d9ff20545f96e6856a47f4851498bf35e4d3c8 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Fri, 31 Jan 2025 17:24:42 -0800 Subject: [PATCH] Move to use pyproject.toml so it is uv compatible --- MANIFEST.in | 2 +- pyproject.toml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 46 --------------------------------------- 3 files changed, 59 insertions(+), 47 deletions(-) delete mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in index 4d1843051..9d9048983 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include requirements.txt +include pyproject.toml include distributions/dependencies.json include llama_stack/distribution/*.sh include llama_stack/cli/scripts/*.sh diff --git a/pyproject.toml b/pyproject.toml index 638dd9c54..1437bcf34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,61 @@ [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" + +[project] +name = "llama_stack" +version = "0.1.0" +authors = [ + { name = "Meta Llama", email = "llama-oss@meta.com" }, +] +description = "Llama Stack" +readme = "README.md" +requires-python = ">=3.10" +license = { text = "MIT" } +classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Information Analysis", +] +dependencies = [ + "blobfile", + "fire", + "httpx", + "huggingface-hub", + "llama-models>=0.1.0", + "llama-stack-client>=0.1.0", + "prompt-toolkit", + "python-dotenv", + "pydantic>=2", + "requests", + "rich", + "setuptools", + "termcolor", +] + +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-asyncio", + "pytest-nbval", # For notebook testing + "black", + "ruff", + "mypy", + "types-requests", + "types-setuptools", +] + +[project.urls] +Homepage = "https://github.com/meta-llama/llama-stack" + +[project.scripts] +llama = "llama_stack.cli.llama:main" +install-wheel-from-presigned = "llama_stack.cli.scripts.run:install_wheel_from_presigned" + +[tool.setuptools] +packages = ["llama_stack"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 2af0fdee3..000000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the terms described in the LICENSE file in -# the root directory of this source tree. - -from setuptools import find_packages, setup - - -# Function to read the requirements.txt file -def read_requirements(): - with open("requirements.txt") as req: - content = req.readlines() - return [line.strip() for line in content] - - -setup( - name="llama_stack", - version="0.1.0", - author="Meta Llama", - author_email="llama-oss@meta.com", - description="Llama Stack", - entry_points={ - "console_scripts": [ - "llama = llama_stack.cli.llama:main", - "install-wheel-from-presigned = llama_stack.cli.scripts.run:install_wheel_from_presigned", - ] - }, - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - url="https://github.com/meta-llama/llama-stack", - packages=find_packages(), - classifiers=[ - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Scientific/Engineering :: Information Analysis", - ], - python_requires=">=3.10", - install_requires=read_requirements(), - include_package_data=True, -)