MacPython Logo from __future__ import *

Kailash and Friends Kailash Kher Kaipa

online mp3 Anoice albums buy Amund Maarud albums online Asia online CD Andy M. Stewart buy tracks Axis online Astral Rising A Beautiful Machine download CD Aereda buy tracks Aksent online tracks Absidia Atrium Carceri A Beautiful Machine Absolum buy CD Aryan Wind and Brumalis and Valhalla Saints online music Atomsmasher download albums AK1200 download music Angelzoom online CD Arturo Mantovani and his Orchestra buy music 16 buy tracks Ashtorath online CD Aimee Mann buy music Anael And Bradfield buy mp3 Autumnblaze download mp3 Aggrolites download CD Arj Snoek buy albums Ada buy CD Aalto Andy With Rama West A Beautiful Machine Absolum online tracks Asura albums online Albert Lee 4 Non Blondes A Beautiful Machine Absolum download albums Andrew Lloyd Webber and Ar Rahman online music African Head Charge download mp3 Amber Asylum online music Analena online music ANTIX feat ROB SALMON A.R. Rahman A Beautiful Machine Absolum online tracks African Blackwood buy mp3 Axis buy mp3 Alan Menken buy music Amoebic Dysentery buy Alph Secakuku A Beautiful Machine albums download Albita online Amparo Ochoa A Beautiful Machine download tracks Andy Partridge and Harold Budd download tracks Anubian Lights Alient Project A Beautiful Machine Absolum buy albums Antonio Forcione download CD Ali G Indahouse online mp3 Art and Jazz Messengers Blakey download Arab Strap A Beautiful Machine online albums Adema buy Agua de Annique A Beautiful Machine buy CD Avalanches download tracks Acroma Andi Deris A Beautiful Machine Absolum download tracks American Steel download albums Amanda Perez online 999 A Beautiful Machine download mp3 Arild Andersen download CD American Steel buy tracks Absolute Beginner download tracks Anubi online albums Ancient Wisdom online A Verse Unsung A Beautiful Machine buy music Aghast Andromeda Island A Beautiful Machine Absolum download Arlo Guthrie A Beautiful Machine online mp3 Aavepyora online albums Achillea buy Andrew Bird A Beautiful Machine buy music Alexey Aigui and Ensemble 4'33'' albums buy Abbey Lincoln and Archie Shepp download albums Archive download CD A Guy Called Gerald feat. D.S. download music Al Di Meola online music Abigail download music Angel Witch online music Adelaide

2004-10-07

py2app: Packaging wxGlade

Filed under: py2app, python — bob @ 8:47 pm

(Note: this information is relevant to py2app 0.1.2 - which is currently just on the svn trunk)

In order to see how hard it would be to package a complicated application such as wxGlade, I decided to give it a try. wxGlade is quite a dynamic beast with regard to code generation and widget plugins, so it was a bit of a pain to deal with. I actually had to add several features to py2app in the process:

  • A feature where one module can be "aliased" to another module. I needed this because wxPython.wx points to wx, but is not actually on the filesystem.
  • An extensible module filtering system, so a recipe can say "yes" or "no" to any extension or python module it comes across. Before this, there was only one static filter that would say "no" to standard library modules when using a vendor Python.

wxGlade causes problems because it needs to list the "codegen" and "widgets" directories, and load code from them. This would be easy if:

  • The path were configurable in some way (using sys.path, a separate variable, etc.). Packages go into .../Python/site-packages/, where it expected to see them at .../
  • The list of modules were configurable in some way (right now it expects to perform an os.listdir)

The naive way would be to just include them as data files, however this prevents dependency analysis from occurring. It turns out that wxGlade did indeed cause new dependencies in these modules so a more complicated solution was required. The solution to this particular problem is in three parts:

  1. Add "codegen" and "widgets" as data files
  2. Add a wxglade recipe that scans all of these plugins for dependencies
  3. Have the wxglade recipe install a filter that makes sure these dependencies aren't copied into the normal place

The other customization I used was a custom boot script, wxGlade.py. This boot script does two things:

  1. Starts up wxGlade as per wxglade.py, but in a simpler way (less is needed, the environment is already sane)
  2. Monkeypatches a bug in wxGlade so that it can open the help files

The example setup.py and bootstrap wxGlade.py are located at: http://undefined.org/python/wxGlade-0.3.4-py2app.tgz

Note that setup.py expects a wxGlade 0.3.4 distribution to be unpacked in ./wxGlade-0.3.4

1 Comment »

  1. In your free time, visit the pages about how are keno numbers drawn

    Comment by black jack card game rules — 2005-05-08 @ 3:05 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Protected by WP-Hashcash.

Powered by WordPress