pep517 provides low-level wrappers to interact with Python package build backends that implement PEP 517 hooks. It is primarily used by build frontends like `pip` and `build` to orchestrate the build process (e.g., building source distributions, wheels). The current stable version is 0.13.1, and releases occur as needed to address issues or align with packaging standards, typically not on a strict cadence.
pip install pep517Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically use `pep517` to interact with a build backend. It creates a temporary project, defines a `pyproject.toml` using `setuptools.build_meta`, and then uses `Pep517HookCaller` to retrieve the build requirements for a wheel. This illustrates the low-level interaction pattern that build frontends employ.
If you want to build a Python package, use a higher-level tool like `python -m build` (from the `build` library) or `pip install .`.
Ensure that the required build backend (e.g., `setuptools`, `hatchling`, `flit_core`) is installed in your virtual environment. If the backend is local or in a non-standard location, provide the correct directories in the `backend_path` argument to `Pep517HookCaller`.
Consult the documentation of the specific build backend you are interacting with (e.g., `setuptools`, `hatchling`) to understand which `config_settings` it supports and their expected values.
Upgrade `pip` (`python -m pip install --upgrade pip`), install necessary system dependencies (e.g., `sudo apt-get install python3-dev build-essential` on Debian/Ubuntu, or specific library development packages as indicated in the verbose error log), or ensure your Python version is supported by the package. As a last resort, `pip install --no-use-pep517 <package-name>` might work if the issue is a package's improper PEP 517 support, though this is generally discouraged.
For package developers, ensure all build dependencies are correctly listed in the `build-system.requires` section of `pyproject.toml`. For users, if upgrading `pip` doesn't resolve it, the package might need to be updated to a version compatible with your Python (e.g., NumPy 1.26+ for Python 3.12+ to address `distutils` removal). You might also need to install missing system-level build tools if they are the root cause.
Carefully examine the detailed error messages in the output preceding this line to identify the specific failure. This will guide you to install missing Python packages, required system-level tools (like compilers or native libraries), or report the issue to the package maintainers if the `pyproject.toml` configuration is incorrect.
Downgrade `pip` to a version compatible with the tool (e.g., `pip install "pip<25.3"` if `pip-tools` is the affected utility) or upgrade the tool itself to a version that supports the newer `pip` APIs.
No dependency data recorded yet.