mirror of
https://github.com/astral-sh/uv.git
synced 2026-05-06 08:56:53 -04:00
Fix scripts/check_system_python.py (#17629)
## Summary Fix a bug in #17533 which was auto-merged despite failures. ## Test Plan N/A (CI PR).
This commit is contained in:
committed by
GitHub
parent
cfd048aa7a
commit
6dd2c0ca4b
@@ -82,11 +82,17 @@ if __name__ == "__main__":
|
||||
|
||||
if args.check_path:
|
||||
process = subprocess.run(
|
||||
["python", "-c", "import sys; print(sys.executable)"],
|
||||
[
|
||||
"python",
|
||||
"-c",
|
||||
"import os, sys; sys.stdout.buffer.write(os.fsencode(sys.executable))",
|
||||
],
|
||||
check=True,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
system_python_path = os.path.normcase(os.path.normpath(process.stdout))
|
||||
system_python_path = os.path.normcase(
|
||||
os.path.normpath(os.fsdecode(process.stdout))
|
||||
)
|
||||
our_python_path = os.path.normcase(os.path.normpath(sys.executable))
|
||||
|
||||
if our_python_path != system_python_path:
|
||||
|
||||
Reference in New Issue
Block a user