mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 07:12:25 +00:00
chore: use uv build backend
The uv build backend is a great choice for most Python projects. It has reasonable defaults, with the goal of requiring zero configuration for most users, but provides flexible configuration to accommodate most Python project structures. It integrates tightly with uv, to improve messaging and user experience. It validates project metadata and structures, preventing common mistakes. And, finally, it's very fast. uv_build backend was declared stable and ready to use in 0.7.20. Reference: https://docs.astral.sh/uv/concepts/build-backend/ Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
5400a2e2b1
commit
822e87907c
4 changed files with 13 additions and 8 deletions
4
.github/actions/setup-runner/action.yml
vendored
4
.github/actions/setup-runner/action.yml
vendored
|
|
@ -9,11 +9,11 @@ runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
|
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python-version }}
|
python-version: ${{ inputs.python-version }}
|
||||||
activate-environment: true
|
activate-environment: true
|
||||||
version: 0.7.6
|
version: 0.7.20
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
2
.github/workflows/python-build-test.yml
vendored
2
.github/workflows/python-build-test.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
activate-environment: true
|
activate-environment: true
|
||||||
version: 0.7.6
|
version: 0.7.20
|
||||||
|
|
||||||
- name: Build Llama Stack package
|
- name: Build Llama Stack package
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ repos:
|
||||||
- id: distro-codegen
|
- id: distro-codegen
|
||||||
name: Distribution Template Codegen
|
name: Distribution Template Codegen
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- uv==0.7.8
|
- uv==0.7.20
|
||||||
entry: uv run --group codegen ./scripts/distro_codegen.py
|
entry: uv run --group codegen ./scripts/distro_codegen.py
|
||||||
language: python
|
language: python
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
@ -98,7 +98,7 @@ repos:
|
||||||
- id: provider-codegen
|
- id: provider-codegen
|
||||||
name: Provider Codegen
|
name: Provider Codegen
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- uv==0.7.8
|
- uv==0.7.20
|
||||||
entry: uv run --group codegen ./scripts/provider_codegen.py
|
entry: uv run --group codegen ./scripts/provider_codegen.py
|
||||||
language: python
|
language: python
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
@ -107,7 +107,7 @@ repos:
|
||||||
- id: openapi-codegen
|
- id: openapi-codegen
|
||||||
name: API Spec Codegen
|
name: API Spec Codegen
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- uv==0.7.8
|
- uv==0.7.20
|
||||||
entry: sh -c 'uv run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
|
entry: sh -c 'uv run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
|
||||||
language: python
|
language: python
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61.0"]
|
requires = ["uv_build>=0.7.20,<0.8.0"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "uv_build"
|
||||||
|
|
||||||
|
[tool.uv.build-backend]
|
||||||
|
module-root = ""
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "llama_stack"
|
name = "llama_stack"
|
||||||
|
|
@ -139,6 +142,8 @@ Homepage = "https://github.com/meta-llama/llama-stack"
|
||||||
llama = "llama_stack.cli.llama:main"
|
llama = "llama_stack.cli.llama:main"
|
||||||
install-wheel-from-presigned = "llama_stack.cli.scripts.run:install_wheel_from_presigned"
|
install-wheel-from-presigned = "llama_stack.cli.scripts.run:install_wheel_from_presigned"
|
||||||
|
|
||||||
|
# Keep this for the docs build even if the build backend is uv_build but that's for the package
|
||||||
|
# build.
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["."]
|
where = ["."]
|
||||||
include = ["llama_stack", "llama_stack.*"]
|
include = ["llama_stack", "llama_stack.*"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue