diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2003-12-02 12:27:25 (GMT) |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2003-12-02 12:27:25 (GMT) |
commit | 2e8a6e0ec6729ffb490130eff6bb33ea9375c75c (patch) | |
tree | 664fc6b4725b35d5b81332f951872770d21f147c /Lib/site.py | |
parent | c2138af4137160b42733d698b72ed63dc2c2a0b1 (diff) | |
download | cpython-2e8a6e0ec6729ffb490130eff6bb33ea9375c75c.zip cpython-2e8a6e0ec6729ffb490130eff6bb33ea9375c75c.tar.gz cpython-2e8a6e0ec6729ffb490130eff6bb33ea9375c75c.tar.bz2 |
To find the curses extension as a DLL (on OS/2), we need to adjust the
library search path to include the extension directory. Without this,
the curses_panel extension can't find the curses extension/DLL, which
exports some curses symbols to it.
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/site.py b/Lib/site.py index e7b9369..7282190 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -194,6 +194,21 @@ del prefix, sitedir _dirs_in_sys_path = None +# 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. +if sys.platform == 'os2emx': + 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) + + # Define new built-ins 'quit' and 'exit'. # These are simply strings that display a hint on how to exit. if os.sep == ':': |