[Pyobjc-dev] Tiny script to build all examples
Brought to you by:
ronaldoussoren
From: Martina O. <Ma...@Oe...> - 2004-05-21 19:07:36
|
Hi!, The following shell one-liner can be used to build the PyObjC examples at once: I think it would be useful to add it to the examples directory: """ #!/bin/sh # Build all examples # (as long as they can be built with bundlebuilder using the usual # python buildapp.py build # incantation) find . -name build*.py -print -execdir python {} build ";" """ BTW, when run a second time, it displays the following harmless error: """ ./Todo/build/ToDo.app/Contents/Resources/buildapp.py Traceback (most recent call last): File "buildapp.py", line 9, in ? images = [ os.path.join('Images', fn) for fn in os.listdir('Images') if fn.lower().endswith('.tiff') ] OSError: [Errno 2] No such file or directory: 'Images' """ This is due to a bug in the buildapp.py script of the ToDo app, which is easily fixed: $ diff buildapp.py buildapp-new.py 11c11 < src = [ fn for fn in os.listdir('.') if fn.endswith('.py') and fn not in ('main.py', 'setup-app.py') ] --- > src = [ fn for fn in os.listdir('.') if fn.endswith('.py') and fn not in ('main.py', 'buildapp.py') ] ciao Martina |