From 48b92fb2c12e97242007e5fbbc1b18a36b7f29b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 18 Jun 2023 13:51:52 +0200 Subject: [PATCH] build: Migrate to pdm-backend Migrate from the deprecated pdm-pep517 backend to pdm-backend that superseded it. This required moving the build-specific keys from tool.pdm table to tool.pdm.backend, as well as modernizing the SCM version usage. The artifacts produced after this change are equivalent, except that their names are normalized to "mkdocs_autorefs" as required by modern PyPA standards. The migration guide is at: https://pdm-backend.fming.dev/migration/ It does not mention SCM support, probably because the "new" metadata is already supported by newer pdm-pep517 versions. The docs are at: https://pdm-backend.fming.dev/metadata/#read-from-scm-tag-supporting-git-and-hg --- pyproject.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c6ab730..af910a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["pdm-pep517"] -build-backend = "pdm.pep517.api" +requires = ["pdm-backend"] +build-backend = "pdm.backend" [project] name = "mkdocs-autorefs" @@ -49,11 +49,13 @@ Gitter = "https://gitter.im/mkdocstrings/community" [project.entry-points."mkdocs.plugins"] autorefs = "mkdocs_autorefs.plugin:AutorefsPlugin" -[tool.pdm] -version = {use_scm = true} +[tool.pdm.build] package-dir = "src" editable-backend = "editables" +[tool.pdm.version] +source = "scm" + [tool.pdm.dev-dependencies] duty = ["duty>=0.7"] docs = [