[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Another minor tweak to configure.py
From: Giovanni Bajo <rasky () develer ! com>
Date: 2007-06-27 23:48:58
Message-ID: 4682F76A.8090809 () develer ! com
[Download RAW message or body]
Hi,
this small patchlet avoid calling abspath() on $PATH elements. Under Windows,
$PATH elements can have leading or trailing whitespaces, which are ignored
(aka stripped); abspath() is not ready to handle that:
[E:\work]python
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.abspath(" c:\\windows")
'E:\\work\\ c:\\windows'
I have no clue whether this can be considered a bug in abspath() or not.
Anyway, calling abspath is redundant and useless since there are no relative
paths in $PATH.
Index: configure.py
===================================================================
--- configure.py (revision 13265)
+++ configure.py (working copy)
@@ -1629,7 +1629,7 @@
global opt_qmake
for d in path.split(os.pathsep):
- opt_qmake = os.path.join(os.path.abspath(d), base_qmake)
+ opt_qmake = os.path.join(d, base_qmake)
if os.access(opt_qmake, os.X_OK):
break
--
Giovanni Bajo
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic