Hi,

I have now created a little ugly hack in the relax main 1.3 line to
work around the Mac Application problem with the missing
Carbon.Evt.TickCount error message (due to Python version issues).
This is as I described at
https://mail.gna.org/public/relax-users/2012-04/msg00021.html, the
command line argument emulation has been turned off relax now works
around this.  I have created a special relax application DMG file for
testing at http://download.gna.org/relax/.  The temporary file is
called relax-1.3_tickcount_fix.Darwin.dmg (with a md5sum of
d2b2c4455ea9783023d81e096e22072f).  Could I ask anyone who is
suffering from, or who can trigger, this TickCount problem if you
could check and see if the problem is now eliminated?

Cheers,

Edward




On 5 April 2012 10:33, Edward d'Auvergne <[email protected]> wrote:
> Hi Ben,
>
> Thank you for that info, that will really help in solving some of
> these problems!  I never though that one of the issues is that of the
> machine architecture.  This is obviously a multi-layer, i.e. not just
> one failure point, problem with the py2app script for converting
> Python programs/scripts into full Mac Applications
> (http://wiki.python.org/moin/MacPython/py2app,
> http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html).  I might
> have to approach this in a number of ways, some fixes will probably
> allow relax to run for some Mac users while others will not be so
> lucky.  In the first attack, I will try to eliminate this TickCount
> problem.  This seams to be a problem with program argument emulation
> on the Mac with certain Python versions.  A solution is posted at
> http://stackoverflow.com/questions/3461983/evt-tickcount-not-found-with-python2-6-on-osx-10-6-3,
> where the suggested code is:
>
> APP = ['MyApp.py']
> OPTIONS = {
>   'argv_emulation': False,
>   ...
> }
>
> setup(
>    app=APP,
>    options={'py2app': OPTIONS},
>    setup_requires=['py2app'],
> )
>
> In relax's py2app setup.py script, the 'argv_emulation' is currently
> set to True (see
> http://svn.gna.org/viewcvs/*checkout*/relax/1.3/setup.py?revision=15481&content-type=text%2Fplain).
>  relax currently requires arguments, but maybe I can hack the code to
> catch this and skip the argument processing.  But only for this
> situation as the prompt/scripting UI modes will be important for some
> users.
>
> 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.  For some people this is not an
> issue while for others it causes relax to fail.
>
> A third problem might be in the wxPython code, as was seen and
> reported by Jack Howarth when creating the Fink distribution of relax
> (see the threads starting at
> https://mail.gna.org/public/relax-users/2012-03/msg00053.html and
> https://mail.gna.org/public/relax-users/2012-04/msg00003.html, and
> http://pdb.finkproject.org/pdb/browse.php?name=relax).  This will
> probably also affect those who install relax from the sources
> distribution file
> (http://www.nmr-relax.com/download.html#Source_code_release).  The
> problem might require a workaround inside the relax GUI code.  I will
> try to tackle each problem one by one, and hopefully as each is solved
> more and more users will have luck in running relax in GUI mode on the
> Mac.
>
> Cheers,
>
> Edward
>
>
> P. S.  For those users who can currently run the relax application in
> GUI mode from the DMG file, these fixes should not affect you.
>
>
>
> On 4 April 2012 18:58, Ben Eisenbraun <[email protected]> wrote:
>> Hi Edward,
>>
>> I am seeing the same issues reported by others.
>>
>>  $ open /programs/i386-mac/relax/1.3.14/relax.app
>>
>> Output in Console.app:
>>
>> 4/4/12 12:15:26.639 PM [0x0-0x18a28a1].com.nmr-relax.relax: Traceback (most 
>> recent call last):
>> 4/4/12 12:15:26.639 PM [0x0-0x18a28a1].com.nmr-relax.relax:   File 
>> "/nfs/programs/i386-mac/relax/1.3.14/relax.app/Contents/Resources/__boot__.py",
>>  line 126, in <module>
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax:     
>> _argv_emulation()
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax:   File 
>> "/nfs/programs/i386-mac/relax/1.3.14/relax.app/Contents/Resources/__boot__.py",
>>  line 124, in _argv_emulation
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax:     
>> _get_argvemulator().mainloop()
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax:   File 
>> "/nfs/programs/i386-mac/relax/1.3.14/relax.app/Contents/Resources/__boot__.py",
>>  line 63, in mainloop
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax:     stoptime = 
>> Evt.TickCount() + timeout
>> 4/4/12 12:15:26.640 PM [0x0-0x18a28a1].com.nmr-relax.relax: AttributeError: 
>> 'module' object has no attribute 'TickCount'
>> 4/4/12 12:15:26.715 PM relax: relax Error
>>
>> This is a problem related to Carbon support in 32-bit vs 64-bit Python. I
>> can reproduce this on the command line in 10.6 and 10.7 like so:
>>
>>  $ type python
>> python is hashed (/usr/bin/python)
>>  $ python
>> Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
>> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on 
>> darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> from Carbon import Evt
>>>>> Evt.TickCount()
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in <module>
>> AttributeError: 'module' object has no attribute 'TickCount'
>>
>> And it's because the 64-bit Python doesn't have full Carbon support:
>>
>>  $ export VERSIONER_PYTHON_PREFER_32_BIT=true
>>  $ python
>> Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:06)
>> [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on 
>> darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> from Carbon import Evt
>>>>> Evt.TickCount()
>> 278493166
>>
>> Similar thread here:
>>
>> http://stackoverflow.com/questions/3461983/evt-tickcount-not-found-with-python2-6-on-osx-10-6-3
>>
>> I can run the relax binary directly if I force 32-bit:
>>
>>  $ arch -i386 relax.app/Contents/MacOS/relax
>>
>> And I can get the relax.app bundle to work if I lipo the relax binary:
>>
>>  $ mv relax relax.orig
>>  $ lipo -thin i386 -output relax relax.orig
>>
>> I tried various other ways of forcing 32-bitness for Python: lipo'ing the
>> python binaries, export VERISONER_PYTHON_PREFER_32_BIT=true,
>> LSArchitecturePriority in the Info.plist without effect.
>>
>> -ben
>>
>> --
>> | Ben Eisenbraun
>> | SBGrid Consortium                          | http://sbgrid.org       |
>> | Harvard Medical School                     | http://hms.harvard.edu  |

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-users mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-users

Reply via email to