Mum isn't happy

Last night Mum found out that I was making my youngest brother write about snakes (coding in Python) and he missed dance practice. Now she said that we can only have half an hour on the good computer each per night and it has to be for study. 

Game development progress is inching forward. I spent 1 hour last night trying to get pyglet to run on my computer. I found that Pyglet was checking the MacOSX version using platform.release which gives 10.5.0. Apparently it quits complaining about 64bit Python and a version of mac less than 10.6.0. And when I checked using this method I found I have 10.6.5 or something. Re-running a python interpreter i found platform.mac_ver I get the correct result. So now I monkey patch my pyglet installation:

import platform
platform.release = lambda:'10.6.5'
import pyglet

I wonder if this bug is specific to my computer, I haven't done much to it other than take it out of the box. I should note that I am running Python in a virtualenv too, I read that it can cause issues. At any rate, I'll look into this a bit further when I have time and maybe file a bug report. Is it a bug or is it my problem?  

(log in to comment)

Comments

I'm not sure, pyglet works fine on my computer.
You might want to just run it natively, or try reinstalling pyglet.
So much lol.
What version of Python are you using?

FWIW on my Mac, which according to "About This Mac" is running 10.6.6:


ActivePython 2.6.4.10 (ActiveState Software Inc.) based on

Python 2.6.4 (r264:75706, Jan 22 2010, 16:40:49) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.release()

'10.6.0'

And this is derived from uname:

l-rjones:challenge richard$ uname -a
Darwin l-rjones.off.ekorp.com 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386


So clearly Apple is doing something stupid here...
Agh. I also meant to ask what version of pyglet you're using as well.
That's my fault, from the recent code added to determine whether or not to use cocoa or carbon.  I didn't realize that platform.release() was returning the Darwin kernel version and not the Mac OS version number which are apparently numbered quite differently in general.  I'll change the repository to use platform.mac_ver().
@richard
Thank you for explaining some of the reason behind this apparent inconsistency. I should have noted that I am using Phillips' experimental branch located here https://evilphillip-cocoa-ctypes.googlecode.com/hg/ which doesn't require pyobjc to be installed. 

pyobjc was an ordeal to install, if you install in the order "pyobjc-core" followed by "PyObjC" this is what worked on my computer (the reverse failed)

@Phillip
Thanks, great job on removing the requirement for PyObjC, I have no idea how you did that. Amazing.