Skip to content

PDM-Backend#

PyPI Tests pre-commit.ci status pdm-managed

PDM-Backend is a build backend that supports the latest packaging standards, which includes:

Quick start#

To use it as PEP 517 build backend, edit your pyproject.toml as below:

1
2
3
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

It is recommended to use PDM to manage your project, which will automatically generate the above configuration for you.

Write the project metadata in pyproject.toml in PEP 621 format:

1
2
3
4
5
6
7
8
9
[project]
name = "my-project"
version = "0.1.0"
description = "A project built with PDM-Backend"
authors = [{name = "John Doe", email="[email protected]"}]
dependencies = ["requests"]
requires-python = ">=3.8"
readme = "README.md"
license = "MIT"

Then run the build command to build the project as wheel and sdist:

1
pdm build
1
2
3
python -m build
# Or
pyproject-build

Read the corresponding documentation sections for more details:

Migrate from pdm-pep517#

pdm-backend is the successor of pdm-pep517. If you are using the latter for your project, read the migration guide to migrate to pdm-backend.

Sponsors#

Thanks to all the individuals and organizations who sponsor PDM project!