# Standardising editable mode installs (runtime layout - not hooks!)

**URL:** <https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098>\
**Category:** Packaging\
**Created:** [May 5, 2020, 9:38am UTC](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098 "2020-05-05T09:38:35Z")\
**Posts on this page:** 4\
**Page:** 7

<div class="post-metadata">

**Author:** ![steve.dower](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steve.dower/32/56_2.png) [@steve.dower](https://discuss.python.org/u/steve.dower)\
**Post date:** [April 20, 2021, 4:29pm UTC](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098/121 "2021-04-20T16:29:46Z")

</div>

Some static analysis tools (particularly IDEs) used to process code under an `if False`, which was pretty useful. You could have generated code to directly link to the source files without impacting runtime (e.g. the most simplistic `sys.path.append("STRING\\LITERAL")` possible). Then the tools could coalesce around supporting this.

However, they’ve gotten too smart right now, so at a minimum you need to `import typing` so you can use the boolean in there to avoid the runtime impact. And you’d still need to design some kind of meta system for them to replace the file with another.

For now, I’d just include enough information in the ` __init__ ` file in a predictable enough way that _if they choose_ they can find the original file, then leave it up to the tools (and their users).

---

<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:** [February 22, 2022, 1:29am UTC](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098/122 "2022-02-22T01:29:20Z")

</div>

Do we know how to start the convo w/ VS Code & PyCharm folks to support this `editables` method? Now that `pip` supports PEP 660, users will encounter this unpleasantry often.

BTW, I just opened a PR to `conda-forge`, just waiting for a review. [Add `editables` recipe by ofek · Pull Request #18120 · conda-forge/staged-recipes · GitHub](https://github.com/conda-forge/staged-recipes/pull/18120)

---

<div class="post-metadata">

**Author:** ![CAM-Gerlach](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cam-gerlach/32/3688_2.png) [@CAM-Gerlach](https://discuss.python.org/u/CAM-Gerlach)\
**Post date:** [February 22, 2022, 2:43am UTC](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098/123 "2022-02-22T02:43:33Z")

</div>

The Editor/IDE Integration category may be of some help to you here…

> **[Editor/IDE Integration](https://discuss.python.org/c/editor-integration/27)**
>
> Discussion place for integrators of Python support into editors and IDEs (not meant for general users).

---

<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:** [February 22, 2022, 3:14pm UTC](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098/124 "2022-02-22T15:14:03Z")

</div>

> [@PEP-660 support and IDEs](https://discuss.python.org/t/pep-660-support-and-ides/13878/1):
>
> Seems that neither IDEs I’ve run into until now supports PEP-660 editables as shipped today by pip. The current logic works out at runtime however the IDE is unaware of the package and does not provide autocomplete. I consider this an important feature gap, so I’d like to start a discussion on how we can add/help IDEs supporting it. The current mechanism as used by most backends is defined by [GitHub - pfmoore/editables](https://github.com/pfmoore/editables) and maintained by @pf_moore . In short, the functionality is: a pth file t…

[Previous page](https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098.md?page=6)
