Code Monkey home page Code Monkey logo

pdm-pep517's Introduction

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]
package-dir = "src"  # Similar to setuptools package_dir option
includes = []        # File patterns to include, the paths are relative to the project root.
excludes = []        # File patterns to exclude, the paths are relative to the project root.
source-includes = [] # File patterns to include in source distribution and exclude in wheel distribution

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.

pdm-pep517's People

Contributors

frostming avatar linw1995 avatar pre-commit-ci[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.