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

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.11.0.tar.gz (200.6 kB view details)

Uploaded Source

Built Distribution

pdm_pep517-0.11.0-py3-none-any.whl (202.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdm-pep517-0.11.0.tar.gz
Algorithm Hash digest
SHA256 a4cd0e98210633b3bf79233294819623262e092e1c4c9751b8a7bb84fb906ac0
MD5 49d4fde2af4eaaea05831e859ff3d9d2
BLAKE2b-256 fe9bd3c2d59f838aecb8ca635b565fb3b86642493c9af306f81cdd79aedf85ff

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for pdm_pep517-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c15fc5db5048d5d6fa448431af37ffcfd4c9ddce1cdc82bcaf84df9160036076
MD5 148a90d28999f7ad9ba24d0a62c50f54
BLAKE2b-256 178aced22a15b543d654341f882a6565de30741d143403b89ca27788c29f1213

See more details on using hashes here.

Provenance

Supported by

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