Day 7: Delivered!

Well, it happened again! Another game!

I've submitted my final version. The source code requires Python 2.7 and works straight away in both Linux and Mac, tomorrow is "package day" and I'll try to make a binary bundle for Windows.

This PyWeek has been a hell of a ride. I made the same mistakes of the previous PyWeek (used a library I didn't know well enough), and few new ones. But I'm happy :)

I'll write a post-mortem in a few days. Now is time to have a burger to celebrate!

EDIT: I've released a new version that includes a patch for a bug in Cocos2d. Thanks to sixthgear for the report!

(log in to comment)

Comments

Hi reidrac, looks like cocos wants SDL to be there even though i think you are not using it? Tested on Mac OS X Mountain Lion with the builtin python (2.7.2 64-bit)

xwing :: Downloads/forscience ยป ./forscience 
Traceback (most recent call last):
  File "./forscience", line 3, in <module>
    from game import Game
  File "/Users/joshua/Downloads/forscience/game/__init__.py", line 20, in <module>
    from cocos.director import director
  File "/Users/joshua/Downloads/forscience/cocos/__init__.py", line 105, in <module>
    import_all()
  File "/Users/joshua/Downloads/forscience/cocos/__init__.py", line 89, in import_all
    import actions
  File "/Users/joshua/Downloads/forscience/cocos/actions/__init__.py", line 37, in <module>
    from basegrid_actions import *
  File "/Users/joshua/Downloads/forscience/cocos/actions/basegrid_actions.py", line 64, in <module>
    from cocos.grid import Grid3D, TiledGrid3D
  File "/Users/joshua/Downloads/forscience/cocos/grid.py", line 43, in <module>
    from director import director
  File "/Users/joshua/Downloads/forscience/cocos/director.py", line 127, in <module>
    import cocos, cocos.audio, cocos.custom_clocks
  File "/Users/joshua/Downloads/forscience/cocos/audio/__init__.py", line 40, in <module>
    import pygame.mixer
  File "/Users/joshua/Downloads/forscience/cocos/audio/pygame/__init__.py", line 73, in <module>
    from cocos.audio.pygame.base import *
  File "/Users/joshua/Downloads/forscience/cocos/audio/pygame/base.py", line 28, in <module>
    from cocos.audio import SDL
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/__init__.py", line 30, in <module>
    import dll as SDL_dll
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/dll.py", line 253, in <module>
    _dll = SDL_DLL('SDL', 'SDL_Linked_Version', '1.2')
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/dll.py", line 58, in __init__
    self._load_library_nix(version)
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/dll.py", line 98, in _load_library_nix
    self._dll = getattr(cdll, library)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 423, in __getattr__
    dll = self._dlltype(name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Library/Frameworks/SDL.framework/SDL, 6): no suitable image found.  Did find:
    /Library/Frameworks/SDL.framework/SDL: no matching architecture in universal wrapper
    /Library/Frameworks/SDL.framework/SDL: no matching architecture in universal wrapper
OK, thanks for reporting... I'm not using SDL at all. I'll try to figure out what's going on!
I've fixed the problem patching Cocos2d.

I'll report a bug, although I believe is the same seen here:

https://code.google.com/p/los-cocos/issues/detail?id=140

The code in DLL.py is not expecting an OSError. I'm caching it and rising an ImportError instead.