Skip to content

Commit

Permalink
build: Migrate to pdm-backend
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgorny authored and pawamoy committed Jun 18, 2023
1 parent 4a45c3b commit 48b92fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 = [
Expand Down

0 comments on commit 48b92fb

Please sign in to comment.