Repository navigation
Rewrite editable install paths in more build backends' hook modules - #2158
Merged
Merged
Conversation
edmorley
force-pushed
the
edmorley/rewrite-more-editable-hook-modules
branch
from
October 9, 2026 14:38
676c1b0 to
3987abb
Compare
Heroku builds occur at a different path to the one the app runs at, so the absolute paths in the files that build backends create for editable installs have to be rewritten for them to work after relocation (see the code comment in `bin/compile` for more details). This worked for the most common build backends and configurations, which create `*.pth` or `__editable___*_finder.py` files. However, some less common build backends and configurations (hatchling's `dev-mode-exact` mode, pdm-backend's `editables` mode and scikit-build-core) also create a hook module (imported by an `import` line in a `.pth` file), whose paths weren't rewritten, so those editable installs broke at runtime. The `find` now matches `*.pth` and `*editable*.py`, which covers all of the hook module names. `*.egg-link` has been dropped, since no supported package manager creates them any more. The `dev-mode-exact` fixture and spec workarounds have been removed. GUS-W-24469383.
edmorley
force-pushed
the
edmorley/rewrite-more-editable-hook-modules
branch
from
October 9, 2026 14:39
3987abb to
a21c412
Compare
edmorley
marked this pull request as ready for review
October 9, 2026 14:44
edmorley
enabled auto-merge (squash)
October 9, 2026 14:44
runesoerensen
approved these changes
Oct 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Heroku builds occur at a different path to the one the app runs at, so the absolute paths in the files that build backends create for editable installs have to be rewritten for them to work after relocation (see the code comment in
bin/compilefor more details).This worked for the most common build backends and configurations, which create
*.pthor__editable___*_finder.pyfiles. However, some less common build backends and configurations (hatchling'sdev-mode-exactmode, pdm-backend'seditablesmode and scikit-build-core) also create a hook module (imported by animportline in a.pthfile), whose paths weren't rewritten, so those editable installs broke at runtime.The
findnow matches*.pthand*editable*.py, which covers all of the hook module names.*.egg-linkhas been dropped, since no supported package manager creates them any more.The
dev-mode-exactfixture and spec workarounds have been removed.GUS-W-24469383.