Skip to main content

A PEP 517 backend for PDM that supports PEP 621 metadata

Project description

PDM-PEP517

Yet another PEP 517 backend.

PyPI Tests pre-commit.ci status pdm-managed

This is the backend for PDM projects, while you can also use it alone. It reads the metadata of PEP 621 format and coverts it to Core metadata.

Use as PEP 517 build backend

Edit your pyproject.toml as follows:

[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

Tool specific settings

Besides of the standard fields specified in PEP 621, PDM-PEP517 honors some other settings to change the build behavior. They should be defined under [tool.pdm] table:

[tool.pdm]
# Specify where the Python packages live.
package-dir = "src"
# File patterns to include, the paths are relative to the project root.
includes = []
# File patterns to exclude, the paths are relative to the project root.
excludes = []
# File patterns to include in source distribution and exclude in wheel distribution.
source-includes = []
# An extra script to populate the arguments of `setup()`, one can build C extensions with this script.
build = "build.py"
# Override the Is-Purelib value in the wheel.
is-purelib = true
# Change the editable-backend: path(default) or editables
editable-backend = "editables"

You don't have to specify all of them, PDM-PEP517 can also derive these fields smartly, based on some best practices of Python packaging.

Supported config settings

pdm-pep517 allows passing config_settings to modify the build behavior. It use the same option convention as python setup.py bdist_wheel.

--python-tag
    Override the python implementation compatibility tag(e.g. cp37, py3, pp3)
--py-limited-api
    Python tag (cp32|cp33|cpNN) for abi3 wheel tag
--plat-name
    Override the platform name(e.g. win_amd64, manylinux2010_x86_64)

For example, you can supply these options with build:

python -m build --sdist --wheel --outdir dist/ --config-setting="--python-tag=cp37" --config-setting="--plat-name=win_amd64"

pip doesn't support passing config_settings yet, please stick to build as the recommended frontend.

License

This project is licensed under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdm-pep517-0.12.0.tar.gz (291.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdm_pep517-0.12.0-py3-none-any.whl (302.5 kB view details)

Uploaded Python 3

File details

Details for the file pdm-pep517-0.12.0.tar.gz.

File metadata

  • Download URL: pdm-pep517-0.12.0.tar.gz
  • Upload date:
  • Size: 291.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for pdm-pep517-0.12.0.tar.gz
Algorithm Hash digest
SHA256 fdc8b6564fbba5fd1d01e37d2cef21bca11e698f70ab0b95740b9f6f0854a789
MD5 c0a9a9fa79572cf9445c745fe5e45071
BLAKE2b-256 9d811f4e15e6a59a66952c18a73b86a3959ddacf305d6c97f71640a7d9865d94

See more details on using hashes here.

File details

Details for the file pdm_pep517-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pdm_pep517-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 302.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for pdm_pep517-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4395009e4589d9f1893dbef9c041a6bcc972493c0895d8d3a1eef8ef25f8317d
MD5 7c4d5da4cc6eecde6b279fecf2ffd1fa
BLAKE2b-256 bd364c6b148e69fdec141f9611513d619fd24d08bbea7040ba4aacb2674fd210

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page