]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport my (!) revision 1.50:
authorMichael W. Hudson <mwh@python.net>
Tue, 26 Nov 2002 09:42:57 +0000 (09:42 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 26 Nov 2002 09:42:57 +0000 (09:42 +0000)
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.

Lib/distutils/sysconfig.py

index fa4a3029488d934973d6d0f334a18722b1c84c31..7c16d51a3ea5bb681e7895467e46bac8207b43c3 100644 (file)
@@ -29,13 +29,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
 
 argv0_path = os.path.dirname(os.path.abspath(sys.executable))
 landmark = os.path.join(argv0_path, "Modules", "Setup")
-if not os.path.isfile(landmark):
-    python_build = 0
-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"))
+
+python_build = os.path.isfile(landmark)
+
 del argv0_path, landmark
 
 # set_python_build() was present in 2.2 and 2.2.1; it's not needed