On Thu, Oct 27, 2011 at 9:05 PM, Bruce Smith <[email protected]> wrote:

> On Thu, Oct 27, 2011 at 12:45 PM, Nathan <[email protected]> wrote:
>
>> I'll run it for OS X Lion tonight (about 8 hours from now).
>>
>> Does this mean you merged the ctypes changes into the default branch?
>>
>> ~ Nathan
>>
>
> Are you planning to do 32-bit (Carbon) or 64-bit (Cocoa)?
>

64-bit


> I have a bugfix for 32-bit which is required if you run it without any
> version of PyObjC present at all. (Apple's Python has PyObjC preinstalled, but
> ActivePython doesn't, at least in Lion and Python 2.7.)
>
> I'll commit this later tonight or tomorrow (followed by some other bugfixes
> I've been procrastinating on committing), but in case you happen to run into
> that problem sooner, the diff for the fix is:
>
>
> % hg diff
> diff -r ea330ef69fbc pyglet/__init__.py
> --- a/pyglet/__init__.py Thu Oct 27 15:26:09 2011 +1100
> +++ b/pyglet/__init__.py Thu Oct 27 19:52:24 2011 -0700
> @@ -193,10 +193,15 @@
>      is_64bits = sys.maxint > 2**32
>      import platform
>      osx_version = platform.mac_ver()[0]
> -    from objc import __version__ as pyobjc_version
>      if is_64bits:
>          if osx_version < '10.6':
>              raise Exception('pyglet is not compatible with 64-bit Python
> for versions of Mac OS X prior to 10.6.')
> +        try:
> +            # note: we don't import objc until now, since it's not needed
> +            # (and not always present) under 32-bit Python.
> +            from objc import __version__ as pyobjc_version
> +        except ImportError:
> +            raise Exception('pyglet requires PyObjC when run in 64-bit
> Python; import objc failed')
>          if pyobjc_version < '2.2':
>              raise Exception('pyglet is not compatible with 64-bit Python
> for versions of PyObjC prior to 2.2')
>          options['darwin_cocoa'] = True
>
>
> (If you want to commit this fix yourself, go ahead if that's more
> convenient.)
>

I won't run into it.  I don't plan to deal with 32-bit at all.


> As for 64-bit Python, I found no way to run pyglet in it myself, under
> Lion. The details are complicated. My issue may have been specific to
> ActivePython and/or Python 2.7, and was certainly specific to Lion. The
> issue (IIRC) was that I needed PyObjcC 2.3 but that version of ActivePython
> (2.7.2.5) only has it up to 2.2 for Lion. (As of a month or two ago.)
>
>
That's odd.  I'm just using the system python under Lion, and it works.
Albeit not perfectly.

~ Nathan

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" 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/pyglet-users?hl=en.

Reply via email to