From bf5841ec3ae4651d452065f56b39e63a42570ffe Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sat, 9 Aug 2025 11:28:24 +0300 Subject: [PATCH 1/2] use uv build backend --- .github/workflows/publish.yml | 3 --- Justfile | 1 + pyproject.toml | 14 ++++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c0699ac..b637272 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,9 +12,6 @@ jobs: - uses: actions/checkout@v4 - uses: extractions/setup-just@v2 - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - run: just publish env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/Justfile b/Justfile index 9f5c2bc..af54993 100644 --- a/Justfile +++ b/Justfile @@ -19,5 +19,6 @@ test *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 0ba5a79..112de88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,10 +27,7 @@ classifiers = [ "Typing :: Typed", "Topic :: Software Development :: Libraries", ] -dynamic = ["version"] -packages = [ - { include = "lite_bootstrap" }, -] +version = "0" [project.urls] repository = "https://github.com/modern-python/lite-bootstrap" @@ -124,11 +121,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 = "lite_bootstrap" +module-root = "" [tool.mypy] python_version = "3.10" From 39a783732ac9c5223bfc37694b415d2d7dbad1e1 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sat, 9 Aug 2025 11:31:16 +0300 Subject: [PATCH 2/2] fix for ruff --- lite_bootstrap/instruments/logging_instrument.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lite_bootstrap/instruments/logging_instrument.py b/lite_bootstrap/instruments/logging_instrument.py index e50fc0f..32242a0 100644 --- a/lite_bootstrap/instruments/logging_instrument.py +++ b/lite_bootstrap/instruments/logging_instrument.py @@ -32,7 +32,7 @@ class RequestProtocol(typing.Protocol): def tracer_injection(_: "WrappedLogger", __: str, event_dict: "EventDict") -> "EventDict": try: - from opentelemetry import trace + from opentelemetry import trace # noqa: PLC0415 except ImportError: # pragma: no cover return event_dict