From 525702e492204456654e569d935a19aa290f1edf Mon Sep 17 00:00:00 2001 From: svlandeg Date: Mon, 10 Nov 2025 15:45:26 +0100 Subject: [PATCH 1/2] set version in __init__.py --- pyproject.toml | 2 +- src/annotated_doc/__init__.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 655ccec..f5dbc38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "annotated-doc" -version = "0.0.3" +dynamic = ["version"] license = "MIT" license-files = ["LICENSE"] description = "Document parameters, class attributes, return types, and variables inline, with Annotated." diff --git a/src/annotated_doc/__init__.py b/src/annotated_doc/__init__.py index 2b27488..472440a 100644 --- a/src/annotated_doc/__init__.py +++ b/src/annotated_doc/__init__.py @@ -1,5 +1,3 @@ -from importlib.metadata import version - from .main import Doc as Doc -__version__ = version("annotated-doc") +__version__ = "0.0.3" From cb70ce977f2e024dcf3d73ce4cc7277be9c70f00 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Mon, 10 Nov 2025 16:17:13 +0100 Subject: [PATCH 2/2] switch to pdm --- pyproject.toml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f5dbc38..ff123e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ classifiers = [ "Typing :: Typed", "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -42,8 +41,8 @@ Issues = "https://github.com/fastapi/annotated-doc/issues" Changelog = "https://github.com/fastapi/annotated-doc/release-notes.md" [build-system] -requires = ["uv_build>=0.9.1,<0.10.0"] -build-backend = "uv_build" +requires = ["pdm-backend"] +build-backend = "pdm.backend" [tool.mypy] strict = true @@ -95,9 +94,13 @@ ignore = [ # Preserve types, even if a file imports `from __future__ import annotations`. keep-runtime-typing = true -[tool.uv.build-backend] -source-include = [ - "tests/**", +[tool.pdm] +version = { source = "file", path = "src/annotated_doc/__init__.py" } +distribution = true + +[tool.pdm.build] +source-includes = [ + "tests/", "requirements*.txt", - "scripts/**", -] + "scripts/", + ]