[Qgis-developer] repo builder tool
b.rowlingson at lancaster.ac.uk
Fri Nov 21 15:18:49 EST 2008
had a good chat with Carson about building plugin repositories from
code the other day. Seems a common pattern could be:
1. keep a tagged SVN copy of 'stable' plugins
2. check out all plugins from that tag
3. build zip files of plugins
4. construct the repository xml description
5. put the zips and xml in the right place.
This could be setup to run nightly or whenever.
I had a quick go at writing some python utils to help with this. Step
3 is a bit tricky, I've written something to ignore .svn and .pyc
files and produce the .zip. It's done in python because I couldn't get
the zip binary to exclude what I wanted - it's probably easy enough
but I'm impatient and did it in python.
Step 4 is easy as long as the plugin module __init.py__ doesn't
import anything it can't get in a standalone (non-qgis) environment.
Putting any other imports into the classFactory function is a neat
trick which fixes this. Then the script can get the info it needs out
of the module for the xml file.
Step 5 could take many forms. I'm thinking of uploading to the same
google code account that I use for SVN. There's a python script for
this kicking around. Others might just need to copy to a
web-accessible directory. I suspect step 5 will be up to the user to
sort out, so I think I'll be developing more of a toolkit than a
complete solution for this.
If anyone has any more thoughts on this, stick your oar in!
More information about the Qgis-developer