# What is PEP 660?


PEP 660 standardizes how [build backends](https://pydevtools.com/handbook/explanation/what-is-a-build-backend.md) implement [editable installs](https://pydevtools.com/handbook/explanation/what-is-an-editable-install.md), bringing consistency to a workflow that was previously tied to [setuptools](https://pydevtools.com/handbook/reference/setuptools.md)' `setup.py develop` command.

## Background

Before PEP 660, editable installs were only available through setuptools via `pip install -e .`, which internally ran `setup.py develop`. This meant that projects using other build backends like [flit](https://pydevtools.com/handbook/reference/flit.md) or [hatch](https://pydevtools.com/handbook/reference/hatch.md) had no standardized way to support editable installs.

[PEP 517](https://pydevtools.com/handbook/explanation/what-is-pep-517.md) introduced a standard interface for build backends but did not include editable installs. PEP 660 fills that gap by defining two optional hook functions that build backends can implement:

- `build_editable` — builds a wheel that, when installed, allows source changes to take effect without reinstalling
- `get_requires_for_build_editable` — declares any extra dependencies needed to build the editable wheel

## How It Works

A build backend that supports PEP 660 produces a special wheel containing either a `.pth` file or an import hook that redirects imports to the source directory. This means changes to the package source are immediately reflected when importing the package, without running `pip install` again.

```bash
# With any PEP 660-compliant build backend
pip install -e .

# Or with uv
uv pip install -e .
```

## Impact

PEP 660 decoupled editable installs from setuptools, allowing the broader ecosystem of build backends to support this workflow. Today, most major build backends — including [hatch](https://pydevtools.com/handbook/reference/hatch.md), [flit](https://pydevtools.com/handbook/reference/flit.md), [pdm](https://pydevtools.com/handbook/reference/pdm.md), and [setuptools](https://pydevtools.com/handbook/reference/setuptools.md) — implement PEP 660.

## Learn More

- [PEP 660 Specification](https://peps.python.org/pep-0660/)
- [What is an editable install?](https://pydevtools.com/handbook/explanation/what-is-an-editable-install.md)
- [What is PEP 517?](https://pydevtools.com/handbook/explanation/what-is-pep-517.md)
