#16135: Removal of OS/2 support (Python code partial cleanup)

This commit is contained in:
Jesus Cea 2012-10-05 03:15:39 +02:00
parent f1af705720
commit 4791a24268
11 changed files with 20 additions and 89 deletions

View file

@ -300,7 +300,7 @@ def getsitepackages(prefixes=None):
continue
seen.add(prefix)
if sys.platform in ('os2emx', 'riscos'):
if sys.platform == 'riscos':
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
sitepackages.append(os.path.join(prefix, "lib",
@ -329,23 +329,6 @@ def addsitepackages(known_paths, prefixes=None):
return known_paths
def setBEGINLIBPATH():
"""The OS/2 EMX port has optional extension modules that do double duty
as DLLs (and must use the .DLL file extension) for other extensions.
The library search path needs to be amended so these will be found
during module import. Use BEGINLIBPATH so that these are at the start
of the library search path.
"""
dllpath = os.path.join(sys.prefix, "Lib", "lib-dynload")
libpath = os.environ['BEGINLIBPATH'].split(';')
if libpath[-1]:
libpath.append(dllpath)
else:
libpath[-1] = dllpath
os.environ['BEGINLIBPATH'] = ';'.join(libpath)
def setquit():
"""Define new builtins 'quit' and 'exit'.
@ -595,8 +578,6 @@ def main():
ENABLE_USER_SITE = check_enableusersite()
known_paths = addusersitepackages(known_paths)
known_paths = addsitepackages(known_paths)
if sys.platform == 'os2emx':
setBEGINLIBPATH()
setquit()
setcopyright()
sethelper()