8000 517: Remove install_editable hook (Option 1c) (#141) · python/peps@024a7d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 024a7d5

Browse files
takluyverbrettcannon
authored andcommitted
517: Remove install_editable hook (Option 1c) (#141)
* 517: Remove install_editable hook (Option 1c) This is the other option for --user editable installs: don't try to standardise a mechanism. This could always be added back in a later PEP. Alternative to gh-140 * Add note about removal of editable install
1 parent c6fbead commit 024a7d5

File tree

1 file changed

+18
-32
lines changed

1 file changed

+18
-32
lines changed

pep-0517.txt

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -212,31 +212,16 @@ including any unrecognized files it created.
212212

213213
Mandatory.
214214

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
232216

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.
237220

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.
240225

241226
::
242227

@@ -560,11 +545,12 @@ across the ecosystem.
560545
more powerful options for evolving this specification in the future.
561546

562547
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
565551
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
568554
possible for build backends to define both methods, for compatibility
569555
with both old and new build frontends.
570556

@@ -582,11 +568,11 @@ achieve. Because ``pip`` controls the code that runs inside the child
582568
process, it can easily write it to do something like::
583569

584570
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(...)
590576
else:
591577
# error handling
592578

0 commit comments

Comments
 (0)
0