[sugar] Python: distutils, setuptools, packages, etc

Marco Pesenti Gritti mpg at redhat.com
Thu Sep 28 03:54:45 EDT 2006


Ian Bicking wrote:
> Marco Pesenti Gritti wrote:
>> There will be activities wrote in C, or activities based on 
>> application already using auto*. Getting these to use distutils would 
>> not be productive (if possible at all).
>
> Agreed.
>
>> But we are going to have documentation on how to write activities and 
>> bless a build system for activities that are written from scratch in 
>> python (which should be the most common case). setuptools might be a 
>> good candidate for this. It would be positive to think and experiment 
>> in this direction. We want to be really easy to write activities. And 
>> I would never put auto* and really easy in the same phrase :)
>
> I envision *a* process for building a new app/bundle/activity that was 
> pure-Python to be:
>
> * Create a proper setup.py (a fairly simple file)
> * Maybe add a few settings to setup.cfg
> * Run "python setup.py olpc_bundle"
>
> And then you'll get a bundle, which I imagine will be a directory with 
> a few eggs (both your package, and any non-standard dependencies) and 
> some metadata taken from setup.cfg (whatever ends up in the bundle 
> spec). The setup.py file itself will probably just be a normal 
> setup.py file like people currently write.
>

Is there a simple, well written setup.py you would suggest to look at to 
get an idea of how it might look for an activity? Also trying to 
actually write something like 
http://wiki.laptop.org/go/Sugar_Activity_Tutorial (the code, not the 
tutorial) using setuptools could really be interesting.

Marco


More information about the Sugar mailing list