summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-03-18 15:19:51 (GMT)
committerGreg Ward <gward@python.net>2000-03-18 15:19:51 (GMT)
commitd03f88a38f9fe56f1981bae50c007d4b21c99001 (patch)
tree7100cce65bb3e8f421391de6b4ac8002398c2a5b /Lib/distutils/unixccompiler.py
parent295765630acaacaebec1f13988b1f3277287b4fc (diff)
downloadcpython-d03f88a38f9fe56f1981bae50c007d4b21c99001.zip
cpython-d03f88a38f9fe56f1981bae50c007d4b21c99001.tar.gz
cpython-d03f88a38f9fe56f1981bae50c007d4b21c99001.tar.bz2
Changed to pay attention to the 'runtime_library_dirs' list (= 'rpath'
option in the 'build_ext' command): * in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs' parameter * in unixccompiler.py and msvccompiler.py: now pass 'self.runtime_library_dirs' to 'gen_lib_options()', and define 'runtime_library_dir_option()' (although in msvccompiler.py it blows up with a DistutilsPlatformError right now!)
Diffstat (limited to 'Lib/distutils/unixccompiler.py')
-rw-r--r--Lib/distutils/unixccompiler.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 0d2858d..ec85571 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -197,7 +197,9 @@ class UnixCCompiler (CCompiler):
self._fix_link_args (objects, output_dir, takes_libs=1,
libraries=libraries, library_dirs=library_dirs)
- lib_opts = gen_lib_options (self, library_dirs, libraries)
+ lib_opts = gen_lib_options (self,
+ library_dirs, self.runtime_library_dirs,
+ libraries)
if type (output_dir) not in (StringType, NoneType):
raise TypeError, "'output_dir' must be a string or None"
if output_dir is not None:
@@ -234,7 +236,9 @@ class UnixCCompiler (CCompiler):
self._fix_link_args (objects, output_dir, takes_libs=1,
libraries=libraries, library_dirs=library_dirs)
- lib_opts = gen_lib_options (self, library_dirs, libraries)
+ lib_opts = gen_lib_options (self,
+ library_dirs, self.runtime_library_dirs,
+ libraries)
output_filename = output_progname # Unix-ism!
if output_dir is not None:
output_filename = os.path.join (output_dir, output_filename)
@@ -262,6 +266,9 @@ class UnixCCompiler (CCompiler):
def library_dir_option (self, dir):
return "-L" + dir
+ def runtime_library_dir_option (self, dir):
+ return "-R" + dir
+
def library_option (self, lib):
return "-l" + lib