[Python-checkins] python/dist/src/Lib site.py,1.53.6.2,1.53.6.3

aimacintyre at users.sourceforge.net aimacintyre at users.sourceforge.net
Tue Dec 2 07:43:55 EST 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv7560

Modified Files:
      Tag: release23-maint
	site.py 
Log Message:
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.


Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.53.6.2
retrieving revision 1.53.6.3
diff -C2 -d -r1.53.6.2 -r1.53.6.3
*** site.py	2 Dec 2003 06:47:37 -0000	1.53.6.2
--- site.py	2 Dec 2003 12:43:52 -0000	1.53.6.3
***************
*** 197,200 ****
--- 197,215 ----
  
  
+ # 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.





More information about the Python-checkins mailing list