pep517
Wrappers to build Python packages using PEP 517 hooks
What it is and what it does
pep517 is a low-level wrapper around the PEP 517 and PEP 660 build system specifications for Python packages. It lets you call build backend hooks (like build_wheel, build_sdist) in an isolated subprocess, with fallbacks for optional hooks so you don't have to check which ones are defined. The package handles the mechanics of invoking a package's build backend without running it in your current process.
The package is now deprecated in favor of pyproject-hooks (lower level) and build (higher level), but remains actively maintained. It depends on tomli for reading pyproject.toml, plus importlib_metadata and zipp for compatibility. You are responsible for installing the build requirements specified in pyproject.toml before calling the hooks.
Use it for:
- Build a Python wheel or sdist from a source directory with a PEP 517 backend, isolating the backend process.
- Query a build backend for its dynamic build requirements before installing them.
- Test whether a project's build backend is correctly configured using the command-line check tool.
- Implement a custom build frontend that needs to call multiple backends with subprocess isolation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides subprocess-isolated wrappers around PEP 517 and PEP 660 build hooks, letting you call Python package build backends without checking which hooks are implemented.
Yes, if you are building a build frontend or need subprocess isolation for PEP 517 backends. No, if you are packaging a single project—use the build package instead. The package is stable and well-maintained, but its deprecation status means new code should prefer pyproject-hooks or build unless you have a specific reason to use pep517 directly.
Install
pep517 on PyPI
pip
pip install pep517uv
uv add pep517poetry
poetry add pep517Installing pep517
Before you install
Low friction: pure Python wheel with three lightweight runtime dependencies (tomli, importlib_metadata, zipp). Active maintenance as of April 2026, though the package itself is deprecated in favor of pyproject-hooks and build.
License in practice
MIT license (permissive): you can use this freely in commercial and private projects with minimal restrictions.
Quickstart
import os
import tomli
from pep517.wrappers import Pep517HookCaller
src = 'path/to/source'
with open(os.path.join(src, 'pyproject.toml'), 'rb') as f:
build_sys = tomli.load(f)['build-system']
hooks = Pep517HookCaller(
src,
build_backend=build_sys['build-backend'],
backend_path=build_sys.get('backend-path'),
)
whl_filename = hooks.build_wheel('destination/folder', {})
You must manually ensure build requirements from pyproject.toml are installed in the environment before calling hooks.
Verify before relying
- Whether the package's deprecation status affects long-term support or if it remains stable for existing users.
- Performance characteristics when calling hooks in subprocess isolation versus direct backend invocation.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — tomli, importlib_metadata, zipp |
| Maintenance | actively maintained — 1,010 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,358,627/month — #1,542 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pep517-0.13.1-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
pyproject-hooksCalls build-backend hooks defined in…
permissive · top 1,000 on PyPI
buildBuilds Python packages in isolated…
permissive · top 1,000 on PyPI
meson-pythonmeson-python is a PEP 517 build backend that…
permissive · top 5,000 on PyPI
wheel-stubA PEP 517 build backend that creates stub…
permissive · top 5,000 on PyPI
pdm-pep517A PEP 517 build backend that reads PEP 621…
permissive · top 15,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
whoolwhool is a PEP 517 and PEP 660 compliant build…
permissive · top 15,000 on PyPI
PyQt-builderPyQt-builder is a PEP 517 compliant build…
permissive · top 15,000 on PyPI
loggingProvides a standard error logging mechanism for…
unclear · top 15,000 on PyPI
virtualenvwrapperProvides shell command wrappers and hooks to…
permissive · top 15,000 on PyPI