From: <pj...@us...> - 2009-09-09 02:59:02
|
Revision: 6766 http://jython.svn.sourceforge.net/jython/?rev=6766&view=rev Author: pjenvey Date: 2009-09-09 02:58:36 +0000 (Wed, 09 Sep 2009) Log Message: ----------- don't assume posix fixes #1425 thanks Matthew L Daniel Modified Paths: -------------- trunk/jython/Lib/distutils/util.py trunk/jython/NEWS Modified: trunk/jython/Lib/distutils/util.py =================================================================== --- trunk/jython/Lib/distutils/util.py 2009-09-08 19:18:26 UTC (rev 6765) +++ trunk/jython/Lib/distutils/util.py 2009-09-09 02:58:36 UTC (rev 6766) @@ -155,25 +155,26 @@ Otherwise, it requires making 'pathname' relative and then joining the two, which is tricky on DOS/Windows and Mac OS. """ - if os.name == 'posix' or os.name == 'java': + os_name = os._name if sys.platform.startswith('java') else os.name + if os_name == 'posix': if not os.path.isabs(pathname): return os.path.join(new_root, pathname) else: return os.path.join(new_root, pathname[1:]) - elif os.name == 'nt': + elif os_name == 'nt': (drive, path) = os.path.splitdrive(pathname) if path[0] == '\\': path = path[1:] return os.path.join(new_root, path) - elif os.name == 'os2': + elif os_name == 'os2': (drive, path) = os.path.splitdrive(pathname) if path[0] == os.sep: path = path[1:] return os.path.join(new_root, path) - elif os.name == 'mac': + elif os_name == 'mac': if not os.path.isabs(pathname): return os.path.join(new_root, pathname) else: @@ -184,7 +185,7 @@ else: raise DistutilsPlatformError, \ - "nothing known about platform '%s'" % os.name + "nothing known about platform '%s'" % os_name _environ_checked = 0 Modified: trunk/jython/NEWS =================================================================== --- trunk/jython/NEWS 2009-09-08 19:18:26 UTC (rev 6765) +++ trunk/jython/NEWS 2009-09-09 02:58:36 UTC (rev 6766) @@ -4,6 +4,7 @@ Bugs Fixed - [ 1079 ] fixed regression on issue: twisted.python.threadable module: missing attribute '_RLock' - [ 1461 ] assert statement should lookup AssertionError using getglobal + - [ 1425 ] distutils/util.py assumes too much posix Jython 2.5.1rc1 New Features This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |