On 12/3/2010 5:06 AM, Giovanni Bajo wrote:
I can submit a patch if that would be helpful.

Yes, please! If you can submit a patch that you know it is fully
working, I can slip it in before PyInstaller 1.5 is released.


Ok, here's the patch. I included the warning message as well as the correct architecture detection. I made this against the current subversion trunk (r1282), and it works for me on Snow Leopard. I didn't test on Windows/Linux.


- Nathan

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Index: Build.py
===================================================================
--- Build.py    (revision 1282)
+++ Build.py    (working copy)
@@ -155,6 +155,12 @@
         new_toc.append((inm, fnm, typ))
     return new_toc
 
+def architecture():
+    if sys.maxint > 3**32:
+        return '64bit'
+    else:
+        return '32bit'
+    
 #--- functons for checking guts ---
 
 def _check_guts_eq(attr, old, new, last_build):
@@ -929,7 +935,7 @@
 
         try:
             import platform
-            dir = platform.system() + "-" + platform.architecture()[0]
+            dir = platform.system() + "-" + architecture()
         except ImportError:
             import os
             n = { "nt": "Windows", "linux2": "Linux", "darwin": "Darwin" }
Index: Configure.py
===================================================================
--- Configure.py        (revision 1282)
+++ Configure.py        (working copy)
@@ -319,6 +319,12 @@
 
 
 if __name__ == '__main__':
+    if sys.platform == 'darwin' and Build.architecture() == '64bit':
+        print "ERROR: PyInstaller does not support Python 64-bit on Mac OSX"
+        print "Try using the 32-bit version of Python, by setting"
+        print "VERSIONER_PYTHON_PREFER_32_BIT=yes in the environment"
+        sys.exit(2)
+
     from pyi_optparse import OptionParser
     parser = OptionParser(usage="%prog [options]")
     parser.add_option('--target-platform', default=None,

Reply via email to