Difference between revisions of "Documentation Team/Obsolete/Services Activity Packagers Guide"
m (moved Documentation Team/Services/Activity Packagers Guide to Walter is a wanker 9/Services/Activity Packagers Guide: Walter is a wanker) |
m (moved Walter is a wanker 9/Services/Activity Packagers Guide to Documentation Team/Services/Activity Packagers Guide over redirect: revert) |
(No difference)
|
Revision as of 19:15, 24 February 2010
Introduction
The purpose of this Guide is describing how to use package activities that use Sugar Services.
Activity dependencies
Every activity which uses Sugar Services will contain additional options in activity.info file:
- requires option, comma separated list of dependencies that should exist
- suggests option, comma separated list of dependencies that could not exist
Each dependency could be:
- service name, the full 0install link will be http://services.sugarlabs.org/<dependency-name>
- sub service slashed name, the full 0install link will be http://services.sugarlabs.org/<dependency-name>.xml
- full 0install link
In any case resulted 0install link will contain proper information about dependency - home page, link to sources, licence etc.
Activity itself doesn't contain any 0sugar related code, 0sugar will export proper environment variables to activity process e.g. PYTHONPATH or LD_LIBRARY_PATH thus dependencies could packaged and activity will not notice any differences between 0install dependencies and installed from packages. Exception is libsugarize service which exports LD_PRELOAD environment variable.
Cache directory
Every activity which uses Sugar Services will contain .0sugar subdirectory in activity root:
- to keep all dependencies implementations (to not download them on demand)
could be any content including binaries - 0sugar launching code, since 0sugar is not part of Sugar Platform
pure python code - .0sugar/launch script that starts 0sugar launching code
exec option from activity.info invokes this script
exec $(dirname $0)/<path-to-0sugar>/0sugar-selector "$@"
If all dependencies(including 0sugar) are packaged then this directory could be just removed.