* If BuildApplet.py is used as an applet it starts with a version of

sys.exutable that isn't usuable on an #!-line. That results in generated
  applets that don't actually work. Work around this problem by resetting
  sys.executable.
* argvemulator.py didn't work on intel macs. This patch fixes this
  (bug #1491468)
This commit is contained in:
Ronald Oussoren 2006-06-07 20:18:44 +00:00
parent 750e92043e
commit 4b7a6c8b58
2 changed files with 45 additions and 57 deletions

View file

@ -16,6 +16,18 @@ import EasyDialogs
import buildtools
import getopt
if not sys.executable.startswith(sys.exec_prefix):
# Oh, the joys of using a python script to bootstrap applicatin bundles
# sys.executable points inside the current application bundle. Because this
# path contains blanks (two of them actually) this path isn't usable on
# #! lines. Reset sys.executable to point to the embedded python interpreter
sys.executable = os.path.join(sys.prefix,
'Resources/Python.app/Contents/MacOS/Python')
# Just in case we're not in a framework:
if not os.path.exists(sys.executable):
sys.executable = os.path.join(sys.exec_prefix, 'bin/python')
def main():
try:
buildapplet()