Fixed MAC 32-bit problem in a nicer way.
This commit is contained in:
parent
1bbd2f1ab7
commit
5918bf1a3c
@ -37,13 +37,45 @@ The [wxPython] packages can be found at http://www.wxpython.org/
|
|||||||
Ubuntu users: the wxPython packages are called 'python-wxgtk' followed by the
|
Ubuntu users: the wxPython packages are called 'python-wxgtk' followed by the
|
||||||
version number."""
|
version number."""
|
||||||
elif '32-bit mode' in str(err):
|
elif '32-bit mode' in str(err):
|
||||||
errmsg = """Problem with importing the required [wxPython] package.
|
import os
|
||||||
|
|
||||||
Possibly the problem is caused by wxPython only working in 32-bit mode currently.
|
key = "VERSIONER_PYTHON_PREFER_32_BIT"
|
||||||
You can try the following on the command line:
|
data = "yes"
|
||||||
|
|
||||||
|
keyfound = False
|
||||||
|
try:
|
||||||
|
if sys.environment[key] == data:
|
||||||
|
keyfound = True
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if keyfound:
|
||||||
|
"""
|
||||||
|
We already tried to set the environment variable, but it is still not working.
|
||||||
|
"""
|
||||||
|
import sys
|
||||||
|
#print "Key found. good job. no success."
|
||||||
|
|
||||||
|
errmsg = """Problem with importing the required [wxPython] package.
|
||||||
|
|
||||||
|
Possibly the problem is caused by wxPython only working in 32-bit mode currently.
|
||||||
|
You can try the following on the command line:
|
||||||
|
|
||||||
|
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
|
||||||
|
$ ./scyther-gui.py"""
|
||||||
|
|
||||||
|
else:
|
||||||
|
"""
|
||||||
|
Key not found. Try if that works.
|
||||||
|
"""
|
||||||
|
import sys
|
||||||
|
from subprocess import call
|
||||||
|
|
||||||
|
#print "Key not found. Trying to set it now."
|
||||||
|
# TODO: check for MAC's if we need something like 'pythonw'
|
||||||
|
call(sys.argv, shell=True, env={key: data})
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
|
|
||||||
$ ./scyther-gui.py"""
|
|
||||||
|
|
||||||
Misc.panic("""
|
Misc.panic("""
|
||||||
ERROR:
|
ERROR:
|
||||||
|
Loading…
Reference in New Issue
Block a user