mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user