question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] Implement PEP 660 -- Editable Installations

See original GitHub issue

What’s the problem this feature will solve?

PEP 660 standardises the mechanism that setup.py develop uses to make “editable” packages.

Currently, pip needs to implement fairly horrible hacks to make legacy setup.py develop builds work. It’d be great if setuptools could implement PEP 660, which would be the last item from setuptools’ end before pip can start the process of removing the legacy directly-call-setup.py build system.

Describe the solution you’d like

PEP 660’s build_editable hook gets implemented in aetuptools.

Alternative Solutions

Not doing this.

I imagine this will mean that either (a) pip continues to maintain editable installs for setuptools or (b) pip drops the legacy build system entirely and users of setuptools projects will no longer be able to make editable installations.

I don’t think (b) is happening any time soon, and it’d likely be best to implement the hook here.

Additional context

IIUC, this has been implemented in setuptools-pep660 already. It might not be a lot of work to migrate the work done there into seriptools directly.

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:22
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

12reactions
pradyunsgcommented, Jul 26, 2022

Closing this out, since https://github.com/pypa/setuptools/pull/3265 implemented this. It’ll be in a release soon-enough.

It still has an experimental flag on it, but it works and that’s the part that I care about. I’ve now seen multiple people point to this issue to say that editable installs don’t work in Python – the only case that doesn’t is setuptools without a setup.py, which is going to be solved once that PR reaches main. 😃

7reactions
pradyunsgcommented, Apr 1, 2022

For completeness, making an update here with how I understand the state of affairs to be.

With #1688 closed, this is now a blocker for getting editable installs working for setuptools’ new pyproject.toml only projects.

In https://github.com/pypa/setuptools/pull/2872, there has been extensive discussion about the implementation approach that setuptools can take for this. There seems to be no clear concensus about how to implement the PEP 660 hooks – there’s significant pushback from the maintainers for implementing the PEP 660 hooks (that enable editable installations, without a setup.py file) using a mechanism similar to setup.py develop today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 660 – Editable installs for pyproject.toml based builds ...
The editable installation mode implies that the source code of the project being installed is available in a local directory. Once the project ......
Read more >
build backend is missing the 'build_editable' hook. - You.com
PEP 660 – Editable installs for pyproject.toml based builds defines how to build projects that only use pyproject.toml . Build tools must implement...
Read more >
How to install a package using pip in editable mode with ...
PEP 660 – Editable installs for pyproject.toml based builds defines how to build projects that only use pyproject.toml . Build tools must implement...
Read more >
History - setuptools 65.6.3.post20221216 documentation
#3265: Added implementation for editable install hooks (PEP 660). By default the users will experience a lenient behavior which prioritises the ability of ......
Read more >
Use and recommend new pip and poetry versions ... - GitLab
However, recently released pip 21.3 has support for PEP 660. ... poetry version so they can install their SDK-based plugins in editable mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found