Skellington improvements

At least one entrant said he didn't use create-upload.py because it didn't cope with his particular preference of source code repository (which IIRC was Mercurial). I'd like to make it cope with more. I've believe I've just added support for Mercurial with the following patch:
 def add_files(generator):
     for dirpath, dirnames, filenames in generator:
-        for name in 'CVS', '.svn':
+        for name in 'CVS', '.svn', '.hg':
             if name in dirnames:
                 dirnames.remove(name)
If I can support more source repositories, making skellington more appealing, then please tell me what (trivial) changes I need to make :)

(log in to comment)

Comments

I believe you can support bazaar as well with '.bzr'
Would many things be likely to go badly wrong if you ignored all filenames starting with a dot? I can't think of any such which you'd likely want to keep in the distribution version.
That's quite true adam. Will do.
In run_game.py I suggest replacing the 'pass' with some more strict, either:
.emit a message 'Please, run from an OS console.Thanks!'; thats the better, but doenst allow to run from interpreter.
.or, check if in the current working directory is a file run_game.py, ; if not do as in the prev, if yes use the cwd to build libdir.(allows the interpreter if in gamedir, but risk starting other game).
Rationale:with current code, in that situation no game will run, except if consist only of main.py, not even using the data.py of skellington. And the error messages generated are misleading, like the 'can not load data\xxxx.png'

Aditionally, I suggest to add
os.chdir(libdir) #or os.chdir('../libdir'), the later properly writed
With this you can start from an OS console in any dir (at least in windows) and you not receive other spurius mesages.
The skellington also strips out .dll files. I'm not sure if anything else got left out of mine -- after fiddling for a moment I just stripped it out and packaged myself.

Hey, you know what would be a great feature for run_game.py? It should check to see if the package you need is installed, and if not, it should download it automatically and put it into a subdirectory of the current directory. That way teams wouldn't need to include it along with their games, and people who already have it installed wouldn't need to download it along with the game.

I would argue that teams *should* package libraries with their games wherever possible to avoid future incompatibility issues.
All right. Nevermind then. I was thinking it seemed silly to get 40 copies of pyglet, but I guess 200 MB isn't so much these days.
Heh. My old PyWeek game "Bouncy the Hungry Rabbit" is in Ubuntu, but it's been broken practically since release because they shipped PyOpenGL 3 with Ubuntu and the release of Bouncy they shipped was not compatible.