[Python-checkins] r74731 - in python/branches/release31-maint: Lib/distutils/tests/test_unixccompiler.py Lib/distutils/unixccompiler.py Misc/NEWS

tarek.ziade python-checkins at python.org
Wed Sep 9 11:07:14 CEST 2009


Author: tarek.ziade
Date: Wed Sep  9 11:07:13 2009
New Revision: 74731

Log:
Merged revisions 74730 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r74730 | tarek.ziade | 2009-09-09 10:48:07 +0200 (Wed, 09 Sep 2009) | 9 lines
  
  Merged revisions 74728 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r74728 | tarek.ziade | 2009-09-09 10:14:20 +0200 (Wed, 09 Sep 2009) | 1 line
    
    Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py
   python/branches/release31-maint/Lib/distutils/unixccompiler.py
   python/branches/release31-maint/Misc/NEWS

Modified: python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py
==============================================================================
--- python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py	(original)
+++ python/branches/release31-maint/Lib/distutils/tests/test_unixccompiler.py	Wed Sep  9 11:07:13 2009
@@ -36,7 +36,23 @@
 
         # hp-ux
         sys.platform = 'hp-ux'
-        self.assertEqual(self.cc.rpath_foo(), '+s -L/foo')
+        old_gcv = sysconfig.get_config_var
+        def gcv(v):
+            return 'xxx'
+        sysconfig.get_config_var = gcv
+        self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo'])
+
+        def gcv(v):
+            return 'gcc'
+        sysconfig.get_config_var = gcv
+        self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
+
+        def gcv(v):
+            return 'g++'
+        sysconfig.get_config_var = gcv
+        self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
+
+        sysconfig.get_config_var = old_gcv
 
         # irix646
         sys.platform = 'irix646'

Modified: python/branches/release31-maint/Lib/distutils/unixccompiler.py
==============================================================================
--- python/branches/release31-maint/Lib/distutils/unixccompiler.py	(original)
+++ python/branches/release31-maint/Lib/distutils/unixccompiler.py	Wed Sep  9 11:07:13 2009
@@ -283,7 +283,9 @@
             # MacOSX's linker doesn't understand the -R flag at all
             return "-L" + dir
         elif sys.platform[:5] == "hp-ux":
-            return "+s -L" + dir
+            if "gcc" in compiler or "g++" in compiler:
+                return ["-Wl,+s", "-L" + dir]
+            return ["+s", "-L" + dir]
         elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
             return ["-rpath", dir]
         else:

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Wed Sep  9 11:07:13 2009
@@ -983,6 +983,10 @@
 Library
 -------
 
+- Issue #6163: Fixed HP-UX runtime library dir options in
+  distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and
+  Michael Haubenwallner.
+
 - Issue #6545: Removed assert statements in distutils.Extension, so the 
   behavior is similar when used with -O.
 


More information about the Python-checkins mailing list