summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-08-04 06:21:25 (GMT)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2002-08-04 06:21:25 (GMT)
commit4104db39b8c8a85b884bbba051d21b7ea1d21ee1 (patch)
tree6be6184bc20eab1b2d5b6e037e10ba993b8fee2b /Lib/distutils
parent428a38c002d99fc224384f5901e7f64b75adcc16 (diff)
downloadcpython-4104db39b8c8a85b884bbba051d21b7ea1d21ee1.zip
cpython-4104db39b8c8a85b884bbba051d21b7ea1d21ee1.tar.gz
cpython-4104db39b8c8a85b884bbba051d21b7ea1d21ee1.tar.bz2
- comment improvement
- implement viable library search routine for EMX
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/emxccompiler.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/Lib/distutils/emxccompiler.py b/Lib/distutils/emxccompiler.py
index 91920eb..9cd9600 100644
--- a/Lib/distutils/emxccompiler.py
+++ b/Lib/distutils/emxccompiler.py
@@ -177,7 +177,8 @@ class EMXCCompiler (UnixCCompiler):
# -- Miscellaneous methods -----------------------------------------
- # overwrite the one from CCompiler to support rc and res-files
+ # override the object_filenames method from CCompiler to
+ # support rc and res-files
def object_filenames (self,
source_filenames,
strip_dir=0,
@@ -204,6 +205,29 @@ class EMXCCompiler (UnixCCompiler):
# object_filenames ()
+ # override the find_library_file method from UnixCCompiler
+ # to deal with file naming/searching differences
+ def find_library_file(self, dirs, lib, debug=0):
+ shortlib = '%s.lib' % lib
+ longlib = 'lib%s.lib' % lib # this form very rare
+
+ # get EMX's default library directory search path
+ try:
+ emx_dirs = os.environ['LIBRARY_PATH'].split(';')
+ except KeyError:
+ emx_dirs = []
+
+ for dir in dirs + emx_dirs:
+ shortlibp = os.path.join(dir, shortlib)
+ longlibp = os.path.join(dir, longlib)
+ if os.path.exists(shortlibp):
+ return shortlibp
+ elif os.path.exists(longlibp):
+ return longlibp
+
+ # Oops, didn't find it in *any* of 'dirs'
+ return None
+
# class EMXCCompiler