mailRe: Temperature calibration & relax @ Mac OS X 10.7. 3 „Lion“


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on April 05, 2012 - 16:49:
Hi,

A solution is posted at
http://stackoverflow.com/questions/3461983/evt-tickcount-not-found-with-python2-6-on-osx-10-6-3,

I saw that suggestion when I read the thread yesterday. If you're willing
to give up the 64-bit version, this thread might also be useful:

http://stackoverflow.com/questions/7472301/how-to-force-py2app-to-run-app-in-32-bit-mode

Is it worth having a 64-bit x86 version?  Would any Mac users need or
use this?  I was hoping to distribute a working Universal binary.
Forcing the i386 architecture may cause problems for people on old ppc
machines, so I would like to find a more elegant solution than forcing
i386 on all Mac users.  I could set the LSArchitecturePriority
Info.plist value to i386 and ppc in the py2app 'setup.py' script and
then recreate the app, then maybe this would be a solution.  But there
must be a better way.


This fix doesn't solve the problem of the py2app created relax app not
using the bundled Python version and internal Python modules, so some
users will still be affected by that.

Yesterday when I was looking at this, I added a 'print sys.executable' to
__boot__.py and got:

4/4/12 12:40:10.353 PM [0x0-0x18ac8ab].com.nmr-relax.relax: 
/nfs/programs/i386-mac/relax/1.3.14/relax.app/Contents/MacOS/python

And it doesn't change regardless of what PythonExecutable or
PyRunTimeLocation is set to in the Info.plist. So it appears that it is
calling the correct binary, but the Contents/MacOS/python is just a binary
wrapper for some other python? I suppose I should read the py2app docs at
some point.

The Contents/MacOS/python file is strange.  It is not python, but a
wrapper to the real Python binary (with a capital P) located somewhere
else in the relax.app file hierarchy.  From memory (I cannot find the
docs at the moment), this is a special file which suppresses the
prompt mode of Python and allows it interact properly as a Mac
application (with the menus, dock, etc.).

I could be wrong, but the Mac Info.plist files seem to only be a front
to what is actually inside the app, so changing it does nothing.  I
don't know why it is pointing to the wrong Python version, but this is
clearly a problem with the py2app script (or the relax setup.py
configuration file).  The sys.executable print outs in the Mac Console
app should be correct though.  I think I might now go and investigate
the wxPython install that comes with Xcode 3.2.6 using the 'file'
program.  I wonder if these binaries are truly 'Universal'?

Cheers,

Edward



Related Messages


Powered by MHonArc, Updated Thu Apr 05 17:40:07 2012