[sugar] Python: distutils, setuptools, packages, etc
Ian Bicking
ianb
Thu Sep 28 16:15:24 EDT 2006
Marco Pesenti Gritti wrote:
>
>>
>> I wouldn't expect eggs to be the bundle format. Bundles would
>> typically include several eggs anyway, since we'd be including the
>> dependencies. So, I'm guessing that an olpc_bundle command would create:
>>
>> MyCode.activity/
>> eggs/
>> MyCode-version.egg/...
>> SomeDependencies-xxx.egg/...
>> activity/
>> activity.info # copied from MyCode/mycode/mycode.activity ?
>> icon, localization...
>>
>> Potentially activity.info could be created from metadata kept
>> elsewhere. Or maybe not, I'm not sure. For instance, the "exec" key
>> is something I think should be automatically generated (since there
>> will be an up-front sys.path fixup to activate the eggs, then calling
>> some function in MyCode). Maybe that's what sugar-activity-factory does?
>>
>
> Eggs sounds useful to package dependencies. We need to figure out how
> the sys.path fixup happens exactly.
I think it's going to be like:
for egg_dir in glob.glob(os.path.join(bundle_dir, 'eggs', '*.egg')):
sys.path.append(egg_dir)
That's pretty much it. Alternately the eggs could be installed directly
and just egg/ added sys.path, but if the eggs contain their own
resources that can get more mixed up (and I suspect lots of eggs will
contain resources).
> sugar-activity-factory just start a dbus service that can create new
> instances of an activity.
Ah, I missed that "exec" is called at install time.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Sugar-devel
mailing list