mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Well, Fred never did explain why the code to determine whether the
calling Python was installed was so complicated, so I simplified it. This should get the snake-farm's build scripts working again.
This commit is contained in:
parent
60519e8d40
commit
6b7d69d9b4
1 changed files with 3 additions and 7 deletions
|
@ -29,13 +29,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||||
|
|
||||||
argv0_path = os.path.dirname(os.path.abspath(sys.executable))
|
argv0_path = os.path.dirname(os.path.abspath(sys.executable))
|
||||||
landmark = os.path.join(argv0_path, "Modules", "Setup")
|
landmark = os.path.join(argv0_path, "Modules", "Setup")
|
||||||
if not os.path.isfile(landmark):
|
|
||||||
python_build = 0
|
python_build = os.path.isfile(landmark)
|
||||||
elif os.path.isfile(os.path.join(argv0_path, "Lib", "os.py")):
|
|
||||||
python_build = 1
|
|
||||||
else:
|
|
||||||
python_build = os.path.isfile(os.path.join(os.path.dirname(argv0_path),
|
|
||||||
"Lib", "os.py"))
|
|
||||||
del argv0_path, landmark
|
del argv0_path, landmark
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue