@@ -212,31 +212,16 @@ including any unrecognized files it created.
212
212
213
213
Mandatory.
214
214
215
- ::
216
-
217
- def install_editable(prefix, config_settings, metadata_directory=None):
218
- ...
219
-
220
- Must perform whatever actions are necessary to install the current
221
- project into the Python installation at ``install_prefix`` in an
222
- "editable" fashion. This is intentionally underspecified, because it's
223
- included as a stopgap to avoid regressing compared to the current
224
- equally underspecified setuptools ``develop`` command; hopefully a
225
- future PEP will replace this hook with something that works better and
226
- is better specified. (Unfortunately, cleaning up editable installs to
227
- actually work well and be well-specified turns out to be a large and
228
- difficult job, so we prefer not to do a half-way job here.)
229
-
230
- For the meaning and requirements of the ``metadata_directory``
231
- argument, see ``build_wheel`` above.
215
+ .. note:: Editable installs
232
216
233
- [XX UNRESOLVED: it isn't entirely clear whether ``prefix`` alone is
234
- enough to support all needed configurations -- in particular,
235
- @takluyver has suggested that contra to the distutils docs, ``--user``
236
- on Windows is not expressible in terms of a regular prefix install.]
217
+ This PEP originally specified a fourth hook, ``install_editable``, to do an
218
+ editable install (as with ``pip install -e``). It was removed due to the
219
+ complexity of the topic, but may be specified in a later PEP.
237
220
238
- Optional. If not defined, then this build backend does not support
239
- editable builds.
221
+ Briefly, the questions to be answered include: what reasonable ways existing
222
+ of implementing an 'editable install'? Should the backend or the frontend
223
+ pick how to make an editable install? And if the frontend does, what does it
224
+ need from the backend to do so.
240
225
241
226
::
242
227
@@ -560,11 +545,12 @@ across the ecosystem.
560
545
more powerful options for evolving this specification in the future.
561
546
562
547
For concreteness, imagine that next year we add a new
563
- ``install_editable2`` hook, which replaces the current
564
- ``install_editable`` hook with something better specified. In order to
548
+ ``get_wheel_metadata2`` hook, which replaces the current
549
+ ``get_wheel_metadata`` hook with something that produces more data, or a
550
+ different metadata format. In order to
565
551
manage the transition, we want it to be possible for build frontends
566
- to transparently use ``install_editable2 `` when available and fall
567
- back onto ``install_editable `` otherwise; and we want it to be
552
+ to transparently use ``get_wheel_metadata2 `` when available and fall
553
+ back onto ``get_wheel_metadata `` otherwise; and we want it to be
568
554
possible for build backends to define both methods, for compatibility
569
555
with both old and new build frontends.
570
556
@@ -582,11 +568,11 @@ achieve. Because ``pip`` controls the code that runs inside the child
582
568
process, it can easily write it to do something like::
583
569
584
570
command, backend, args = parse_command_line_args(...)
585
- if command == "do_editable_install ":
586
- if hasattr(backend, "install_editable2 "):
587
- backend.install_editable2 (...)
588
- elif hasattr(backend, "install_editable "):
589
- backend.install_editable (...)
571
+ if command == "get_wheel_metadata ":
572
+ if hasattr(backend, "get_wheel_metadata2 "):
573
+ backend.get_wheel_metadata2 (...)
574
+ elif hasattr(backend, "get_wheel_metadata "):
575
+ backend.get_wheel_metadata (...)
590
576
else:
591
577
# error handling
592
578
0 commit comments