Small modification to modulehunter.py to correctly pick up the latest wxPython version if Phoenix binaries are not available.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2012-04-07 21:07:41 +00:00
parent ff175387b3
commit 7bf1b0e53d

View File

@@ -33,16 +33,21 @@ sys.setdefaultencoding("utf-8")
try:
import wx
except ImportError:
wxPath = None
wxPath = ''
basePath = ''
for path in sys.path:
if 'wx-' in path:
wxPath = path
break
dummy, newPath = os.path.split(path)
if newPath > wxPath:
wxPath = newPath
basePath = dummy
if wxPath is None:
if not wxPath:
raise Exception('Unable to find the wx package')
sys.path.insert(0, wxPath)
sys.path.insert(0, os.path.join(basePath, wxPath))
import wx