General cleanup, raise normalization in Lib/distutils.
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index c40c2e7..70a2799 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -27,11 +27,7 @@
# different (hard-wired) directories.
argv0_path = os.path.dirname(os.path.abspath(sys.executable))
-landmark = os.path.join(argv0_path, "Modules", "Setup")
-
-python_build = os.path.isfile(landmark)
-
-del landmark
+python_build = os.path.isfile(os.path.join(argv0_path, "Modules", "Setup"))
def get_python_version():
@@ -105,7 +101,6 @@
return libpython
else:
return os.path.join(libpython, "site-packages")
-
elif os.name == "nt":
if standard_lib:
return os.path.join(prefix, "Lib")
@@ -114,7 +109,6 @@
return prefix
else:
return os.path.join(PREFIX, "Lib", "site-packages")
-
elif os.name == "mac":
if plat_specific:
if standard_lib:
@@ -126,13 +120,11 @@
return os.path.join(prefix, "Lib")
else:
return os.path.join(prefix, "Lib", "site-packages")
-
elif os.name == "os2":
if standard_lib:
return os.path.join(PREFIX, "Lib")
else:
return os.path.join(PREFIX, "Lib", "site-packages")
-
else:
raise DistutilsPlatformError(
"I don't know where Python installs its library "
@@ -216,7 +208,7 @@
define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
#
- while 1:
+ while True:
line = fp.readline()
if not line:
break
@@ -254,9 +246,9 @@
done = {}
notdone = {}
- while 1:
+ while True:
line = fp.readline()
- if line is None: # eof
+ if line is None: # eof
break
m = _variable_rx.match(line)
if m:
@@ -325,7 +317,7 @@
# 'parse_makefile()', which takes care of such expansions eagerly,
# according to make's variable expansion semantics.
- while 1:
+ while True:
m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
if m:
(beg, end) = m.span()