# PEP 660: Editable installs for PEP-517 style build backends

**URL:** <https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510>\
**Category:** Packaging\
**Created:** [May 2, 2021, 10:38am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510 "2021-05-02T10:38:07Z")\
**Posts on this page:** 20\
**Page:** 12

<div class="post-metadata">

**Author:** ![frostming](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/frostming/32/326_2.png) [@frostming](https://discuss.python.org/u/frostming)\
**Post date:** [June 18, 2021, 6:22am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/224 "2021-06-18T06:22:18Z")

</div>

Hi all, I spent an hour adding support for PEP 660 in [Implement PEP 660 with editables by frostming · Pull Request #36 · pdm-project/pdm-pep517 · GitHub](https://github.com/pdm-project/pdm-pep517/pull/36), which leverages importing redirection with `editables`.

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 21, 2021, 6:47am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/225 "2021-06-21T06:47:44Z")

</div>

I’m collecting links to PEP 660 prototypes to add in the PEP. I currently know about and have links to prototypes in pip, flit, enscons, pdm, and setuptools.

@ofek I think you mentioned you had one in hatch but I can’t readily find it. If there is something you want linked in the PEP, just let me know.

If I missed any other, let me know too.

---

<div class="post-metadata">

**Author:** ![pradyunsg](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pradyunsg/32/206_2.png) [@pradyunsg](https://discuss.python.org/u/pradyunsg)\
**Post date:** [June 21, 2021, 9:09am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/226 "2021-06-21T09:09:32Z")

</div>

Can we re-title this PEP to use the term “pyproject.toml based builds” instead of referencing PEP 517 directly?

It would be good to start using a non-PEP-based name for the interface defined in PEP 517. Previously discussed at:

> [@Name for pyproject.toml builds and PEPs](https://discuss.python.org/t/name-for-pyproject-toml-builds-and-peps/1659):
>
> One of the take aways I have from the discussions I had at PyCon US 2019 is that we need a better name for our PEP 517, 518 and to be written editable installs PEP. Currently, it is trivial for us “experts” to communicate using PEP numbers since we’re all mostly aware of these things and it’s unambiguous. However, a PEP number doesn’t mean much to an average python user. It would probably help if we’re able to think of a name that covers these newer build mechanisms to make it easier to talk a…

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 21, 2021, 9:39am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/227 "2021-06-21T09:39:41Z")

</div>

> [@pradyunsg](#):
>
> Can we re-title this PEP to use the term “pyproject.toml based builds” instead of referencing PEP 517 directly?

Fine with me. Done in the open PR.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [June 21, 2021, 10:14am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/228 "2021-06-21T10:14:53Z")

</div>

While we’re changing the title can we change to something that covers the angle it takes? Because PEP-662 is also `Editable installs for pyproject.toml based builds`.

IMHO a better name would be `Editable installs via build backend import hooks` would be more appropriate and differentiate it better from the other proposal: `Editable installs via virtual wheels`.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [June 21, 2021, 10:48am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/229 "2021-06-21T10:48:08Z")

</div>

> [@bernatgabor](#):
>
> IMHO a better name would be `Editable installs via build backend import hooks`

-1 on implying that this PEP requires the use of import hooks (it doesn’t).

How about “PEP 660: Editable installs for pyproject.toml based projects (wheel based)” and “PEP 662: Editable installs for pyproject.toml based projects (virtual wheels)” for the two PEPs?

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [June 21, 2021, 11:16am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/230 "2021-06-21T11:16:00Z")

</div>

A virtual wheel is also a wheel, so it perhaps more appropriate to say that’s backend driven, or something around that.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [June 21, 2021, 11:16am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/231 "2021-06-21T11:16:56Z")

</div>

> [@pf\_moore](#):
>
> -1 on implying that this PEP requires the use of import hooks (it doesn’t).

I might have missed here something, what other options does a backend have? Likely the PEP should mention it, because currently it only references editable package that AFAIK uses always import hooks.

---

<div class="post-metadata">

**Author:** ![layday](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/layday/32/2771_2.png) [@layday](https://discuss.python.org/u/layday)\
**Post date:** [June 21, 2021, 11:39am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/232 "2021-06-21T11:39:51Z")

</div>

I suggest:

- PEP 660: Backend-driven editable installs for pyproject.toml-based projects
- PEP 662: Frontend-driven editable installs for pyproject.toml-based projects

Although PEP 662’s scope is quite broad and “frontend-driven” doesn’t quite capture it…

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 21, 2021, 11:54am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/233 "2021-06-21T11:54:41Z")

</div>

> [@bernatgabor](#):
>
> I might have missed here something, what other options does a backend have? Likely the PEP should mention it, because currently it only references editable package that AFAIK uses always import hooks.

Have a look at the “What to put in the wheel” section of PEP 660. It mentions 2 other methods which do not rely on import hooks but rather PYTHONPATH update via a non executable .pth.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [June 21, 2021, 11:59am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/234 "2021-06-21T11:59:22Z")

</div>

> [@bernatgabor](#):
>
> I might have missed here something, what other options does a backend have?

A .pth file, exactly like setuptools does at the moment. Or self-replacing modules, as the original version of the editables project used. Anything that can go in a wheel.

---

<div class="post-metadata">

**Author:** ![ofek](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ofek/32/1033_2.png) [@ofek](https://discuss.python.org/u/ofek)\
**Post date:** [June 21, 2021, 10:48pm UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/235 "2021-06-21T22:48:08Z")

</div>

> [@sbidoul](#):
>
> @ofek I think you mentioned you had one in hatch but I can’t readily find it. If there is something you want linked in the PEP, just let me know.

I haven’t released it yet but it’s on PyPI: [hatchling · PyPI](https://pypi.org/project/hatchling/)

The `hatchling` backend is complete, I’m almost done the `hatch` CLI

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 22, 2021, 8:52am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/236 "2021-06-22T08:52:00Z")

</div>

Here is the PR to add links to prototypes in the PEP: [PEP 660: add links to prototypes by sbidoul · Pull Request #1998 · python/peps · GitHub](https://github.com/python/peps/pull/1998/files)

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 23, 2021, 7:26am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/237 "2021-06-23T07:26:50Z")

</div>

A new version of the PEP has been published.

Changes compared to the initial version include:

- removal of the `scheme` argument
- an approach to use symbolic links in “What to put in the wheel”
- PEP 662 in rejected ideas, and why (in a nutshell, frontend interoperability)
- links to available prototypes
- new title
- various minor clarifications

To the best of my knowledge, all feedback has been taken into account. Of course, do not hesitate to let me know if something is missing.

@pfmoore if nothing else pops up, it is ready for pronouncement.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [June 23, 2021, 7:57am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/238 "2021-06-23T07:57:33Z")

</div>

> [@sbidoul](#):
>
> @pfmoore if nothing else pops up, it is ready for pronouncement.

Thanks. I would like to avoid having to pronounce on one of the two PEPs before the other is ready, so would you be OK if I delayed pronouncement for a little while?

@bernatgabor said [here](https://discuss.python.org/t/discuss-pep-662-editable-installs-via-virtual-wheels/9071/127) that PEP 662 is about 3 weeks away from being ready (he said “a month” about 6 days ago). That would mean I’d be looking at making a decision around the weekend of 17/18 July. @sbidoul is that OK with you?

@bernatgabor if you are going to struggle to make that deadline, I suggest you finalise your PEP _without_ one or both of the POCs. Lack of POCs won’t harm your PEP’s chances as much as not being able to get consensus on an agreed design (I’d like to see at least an indication that @pganssle is OK with the final form of PEP 662, if it’s to be a serious contender for approval, as Paul was the main other person expressing strong reservations about PEP 660).

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 23, 2021, 8:05am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/239 "2021-06-23T08:05:33Z")

</div>

> [@pf\_moore](#):
>
> OK if I delayed pronouncement for a little while?

Sure, of course.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [June 23, 2021, 8:09am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/240 "2021-06-23T08:09:36Z")

</div>

I’m not happy with the title of this PEP yet:

- Do we need the `for pyproject.toml-based projects` part in the title? Feels redundant considering is the only type of project supported by PyPA.
- PEP 662 is also wheel-based: virtual wheel-based. So the wheel-based part feels to me adds no value.
- Does not mention the core trait of the PEP, that the backend is driving the editable aspect.

I’ll see when and how I can finish PEP-662, it’s a WIP.

---

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [June 23, 2021, 8:27am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/241 "2021-06-23T08:27:48Z")

</div>

I’m fine with the title. I don’t think hair-splitting over the titles is the key blocker here 🙂

> [@bernatgabor](#):
>
> I’ll see when and how I can finish PEP-662, it’s a WIP.

Let me know if you’re not going to make 17/18 July. Worst case, I’ll make a decision on PEP 660 in isolation. I don’t consider it essential for PEP 662 to be completed, there’s been just as long for a “virtual wheel” proposal to be developed and finalised as PEP 660 has had, the fact that no-one stepped up to write such a PEP until PEP 660 was almost complete is a point _against_ the proposal, not a justification for more delays.

---

<div class="post-metadata">

**Author:** ![bernatgabor](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/bernatgabor/32/3003_2.png) [@bernatgabor](https://discuss.python.org/u/bernatgabor)\
**Post date:** [June 23, 2021, 9:12am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/242 "2021-06-23T09:12:57Z")

</div>

> [@pf\_moore](#):
>
> I’m fine with the title. I don’t think hair-splitting over the titles is the key blocker here 🙂

Eh, this sounds like dismissing my concerns about the topic (and considering you’re packaging BDFL and the one pronouncing on these PEPs, I’m worried that pronouncement becomes authoritative). I’ve enumerated three separate concrete problems, so I’d appreciate addressing why those are not valid.

---

<div class="post-metadata">

**Author:** ![sbidoul](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/sbidoul/32/244_2.png) [@sbidoul](https://discuss.python.org/u/sbidoul)\
**Post date:** [June 23, 2021, 10:12am UTC](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/243 "2021-06-23T10:12:08Z")

</div>

I personally don’t care much about the title, as long as it remains accurate. To answer each concern:

> [@bernatgabor](#):
>
> Do we need the `for pyproject.toml-based projects` part in the title? Feels redundant considering is the only type of project supported by PyPA.

I’m running out of ideas here. Do you have an alternative proposal, that also addresses Praduyn’s concern about using a friendlier name than “PEP 517” ?

> [@bernatgabor](#):
>
> PEP 662 is also wheel-based: virtual wheel-based. So the wheel-based part feels to me adds no value.

Can we agree that PEP 660 is more wheelish than PEP 662, since it uses a spec-compliant wheel as interface ?

> [@bernatgabor](#):
>
> Does not mention the core trait of the PEP, that the backend is driving the editable aspect.

I’m fine to mention the backend in the title. However, backend-driven might imply that the backend does the installation, which is not true, as the backend remains responsible for a build step only.

Conversely, I’d find it misleading to characterize PEP 662 as frontend-driven only, as it requires close (closer actually) cooperation and understanding between frontend and backend.

So all in all, I prefer the current titles to, e.g. [this proposal](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510/232).

[Previous page](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510.md?page=11)

[Next page](https://discuss.python.org/t/pep-660-editable-installs-for-pep-517-style-build-backends/8510.md?page=13)
