mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Another workaround, to find the IDE directory when we're in MacPython-OSX
on Jaguar. Ceteram censeam W era packagendam esse.
This commit is contained in:
parent
972573553e
commit
293fdeb31e
1 changed files with 10 additions and 0 deletions
|
@ -20,6 +20,9 @@ def init():
|
||||||
macresource.need('DITL', 468, "PythonIDE.rsrc")
|
macresource.need('DITL', 468, "PythonIDE.rsrc")
|
||||||
widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
|
widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
|
||||||
widgetresfile = os.path.join(*widgetrespathsegs)
|
widgetresfile = os.path.join(*widgetrespathsegs)
|
||||||
|
if not os.path.exists(widgetresfile):
|
||||||
|
widgetrespathsegs = [os.pardir, "Tools", "IDE", "Widgets.rsrc"]
|
||||||
|
widgetresfile = os.path.join(*widgetrespathsegs)
|
||||||
refno = macresource.need('CURS', 468, widgetresfile)
|
refno = macresource.need('CURS', 468, widgetresfile)
|
||||||
if os.environ.has_key('PYTHONIDEPATH'):
|
if os.environ.has_key('PYTHONIDEPATH'):
|
||||||
# For development set this environment variable
|
# For development set this environment variable
|
||||||
|
@ -28,6 +31,13 @@ def init():
|
||||||
# We're not a fullblown application
|
# We're not a fullblown application
|
||||||
idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
|
idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
|
||||||
ide_path = os.path.join(*idepathsegs)
|
ide_path = os.path.join(*idepathsegs)
|
||||||
|
if not os.path.exists(ide_path):
|
||||||
|
idepathsegs = [os.pardir, "Tools", "IDE"]
|
||||||
|
for p in sys.path:
|
||||||
|
ide_path = os.path.join(*([p]+idepathsegs))
|
||||||
|
if os.path.exists(ide_path):
|
||||||
|
break
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# We are a fully frozen application
|
# We are a fully frozen application
|
||||||
ide_path = sys.argv[0]
|
ide_path = sys.argv[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue