mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Remove prepended sys.path (#11954)
We prepend the interpreter discovery in a temporary path to `sys.path`, which we have to strip to avoid the `sys.path` value containing a then-deleted temp dir.
This commit is contained in:
parent
f44aba0a96
commit
12f8d6f2c5
1 changed files with 4 additions and 1 deletions
|
@ -605,7 +605,10 @@ def main() -> None:
|
|||
"sys_prefix": sys.prefix,
|
||||
"sys_base_executable": getattr(sys, "_base_executable", None),
|
||||
"sys_executable": sys.executable,
|
||||
"sys_path": sys.path,
|
||||
# We prepend the location with the interpreter discovery script copied to a
|
||||
# temporary path to `sys.path` so we can import it, which we have to strip later
|
||||
# to avoid having this now-deleted path around.
|
||||
"sys_path": sys.path[1:],
|
||||
"stdlib": sysconfig.get_path("stdlib"),
|
||||
# Prior to the introduction of `sysconfig` patching, python-build-standalone installations would always use
|
||||
# "/install" as the prefix. With `sysconfig` patching, we rewrite the prefix to match the actual installation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue