mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 07:35:27 -04:00
fix(cookbook): load user-site pth hooks for runtime installs
Replay user-site .pth hooks when checking cookbook runtime dependencies so packages installed with --user are visible to dependency completion. Includes focused regression coverage.
This commit is contained in:
@@ -106,4 +106,9 @@ def test_local_dependency_probe_refreshes_user_site_visibility():
|
||||
|
||||
assert "importlib.invalidate_caches()" in source
|
||||
assert "user_site = site.getusersitepackages()" in source
|
||||
assert "if user_site and os.path.isdir(user_site) and user_site not in sys.path:" in source
|
||||
# addsitedir (not a bare sys.path.append) so user-site `.pth` hooks are
|
||||
# replayed when a package is installed into an already-running process —
|
||||
# otherwise setuptools' distutils shim never activates and basicsr-based
|
||||
# deps (realesrgan) probe as not-installed until a restart. See #4810.
|
||||
assert "if user_site and os.path.isdir(user_site):" in source
|
||||
assert "site.addsitedir(user_site)" in source
|
||||
|
||||
Reference in New Issue
Block a user