Call for help from component devs! :-) (was Re: [wxPython-dev] 2.8.0 plans)

Kevin Ollivier kevino at theolliviers.com
Sat Dec 2 12:34:02 PST 2006


Hi Robin and all,

On Nov 30, 2006, at 12:31 PM, Robin Dunn wrote:

> Hi folks,
>
> I just wanted to give all of you a heads up that wxWidgets and  
> wxPython 2.8.0 will be released sometime around next weekend in  
> order to meet the new cut-off date for getting the release into  
> Apple's hands for OSX 10.5.  So if any of you are planning on  
> updates to your contributed modules, or want to get new modules  
> contributed, now is the time to do it.  I would like to have  
> everything ready to go by 1 week from tomorrow.

Speaking of which, would anyone be interested in helping me test out  
the wxAddons system I've been working on? It's a system for allowing  
contributed modules to be dynamically upgradable, and for non- 
contributed modules to be easily found/installed/managed. Think of a  
CPAN or CheeseShop for wxPython components. The wxaddons module is  
included in the wxPython preview release Robin released on Thursday,  
and the guts of it are ready to go. (I'm still working on the web  
site, though.) Here's a quick FAQ:

1) Why not just have the component installed into wx.lib?

Because things in wx.lib are only updated when wxPython is, and if  
there's a significant bug, wxPython users are stuck with it. The only  
alternatives are to hack an install routine to update wx.lib modules,  
or require a separate import syntax  Things in wxaddons are  
dynamically upgradable - even the components actually distributed  
with wxPython.

2) How does the user install my component?

For right now, the easiest way is to do "import wxaddons; import  
wxaddons.myModule". Unless the user has turned off component  
checking, when wxaddons realizes the module doesn't exist, it will  
try querying the wxaddons database for the component, and if it  
exists, it will prompt the user to download the component. In other  
words, automated dependency installation. ;-)

They can also download the source tarball themselves at any time,  
then unpack it and do python setup.py install, just like any other  
distutils module - only this module will go into the wxaddons module  
instead of plain site-packages.

In the future, there will be a GUI for managing components, but  
obviously the focus for 2.8 was getting the guts in good shape so  
that Leopard users could use this system and would just have to  
download the GUI later.

3) What if I've got a wxaddon distributed with wxPython, but my app  
needs a newer version than what's installed?

In this case, do "install wxaddons; wxaddons.require_addon_version 
(name="myModule", version="1.0.0", canBeNewer=True) # or false ;-)

This will use the same automated dependency installation logic, so if  
the user doesn't have the version it will help them get it.

4) So how do I get started?

Read this http://wxaddons.wxcommunity.com/wxaddon_guide.html. That  
has all the info, and all the links, you need to create your own  
component.

5) Is the web site really going to look plain like that?

I'm working on a design here, but I haven't worked out the system for  
updating pages when the template is updated:

http://wxaddons.wxcommunity.com/index_draft.html

I might just go the typical PHP route and have header() and footer()  
functions, as I need to be able to add various PHP bits throughout  
the page, but I'm still looking at a way I can cleanly separate the  
template into a plain HTML page. (Was that explanation too long? ;-)

Thanks,

Kevin






More information about the wxpython-dev mailing list