From 73816557cfd0bcc2ef0a214077b00819e529b269 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sat, 16 Aug 2025 12:09:10 +0300 Subject: [PATCH] migrate to uv-build --- .github/workflows/workflow.yml | 3 ++- Justfile | 13 +++++++------ pyproject.toml | 11 ++++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 041289c..894d465 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,4 +16,5 @@ jobs: uses: community-of-python/community-workflow/.github/workflows/preset.yml@main with: python-version: '["3.10","3.11","3.12","3.13"]' - secrets: inherit \ No newline at end of file + os: '["ubuntu-latest"]' + secrets: inherit diff --git a/Justfile b/Justfile index bd3724f..af54993 100644 --- a/Justfile +++ b/Justfile @@ -2,22 +2,23 @@ default: install lint test install: uv lock --upgrade - uv sync --all-extras --all-packages --frozen + uv sync --all-extras --frozen lint: - uv run ruff format . - uv run ruff check . --fix + uv run ruff format + uv run ruff check --fix uv run mypy . lint-ci: - uv run ruff format . --check - uv run ruff check . --no-fix + uv run ruff format --check + uv run ruff check --no-fix uv run mypy . test *args: - uv run pytest {{ args }} + uv run --no-sync pytest {{ args }} publish: rm -rf dist + uv version $GITHUB_REF_NAME uv build uv publish --token $PYPI_TOKEN diff --git a/pyproject.toml b/pyproject.toml index a27272c..101babb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ dependencies = [ "multidict", "circuit-breaker-box", ] -dynamic = ["version"] +version = "0" authors = [{ name = "community-of-python" }] keywords = [ "python", @@ -42,11 +42,12 @@ dev = [ ] [build-system] -requires = ["hatchling", "hatch-vcs"] -build-backend = "hatchling.build" +requires = ["uv_build"] +build-backend = "uv_build" -[tool.hatch.version] -source = "vcs" +[tool.uv.build-backend] +module-name = "base_client" +module-root = "" [tool.mypy] python_version = "3.10"