Platform Team/Guide/Sweets Packaging: Difference between revisions
No edit summary |
|||
| Line 217: | Line 217: | ||
=== Developing activities === | === Developing activities === | ||
The | The traditional development related routine for activity sources is to run the {{Code|setup.py}} script located in the root activity directory. With Sweets, these routines might be accomplished with the {{Code|sweets}} command. Here is some background information: | ||
* | * A downside of using Sweets is that running {{Code|setup.py}} requires being in the Sugar session (in order to have all the libraries that {{Code|setup.py}} injects); | ||
* Sweets is designed to support multiple software versions at the same time | * Sweets is designed to support multiple software versions at the same time. So to avoid having to login to different Sugar sessions for creating source tarballs, for example, it makes more sense to have a standalone utility; | ||
* {{Code|sweets}} command already contains development related functionality | * The {{Code|sweets}} command already contains development related functionality; it is useful to keep all development related functions in one utility. | ||
Sweets support the following {{Code|setup.pu}}'s commands: | Sweets support the following {{Code|setup.pu}}'s commands: | ||
| Line 232: | Line 232: | ||
And don't support the following: | And don't support the following: | ||
* {{Code|dev}} | * {{Code|dev}} - seems to be a needlessly exaggerated function that creates a symbolic link in the {{Code|~/Activities}} directory to activity sources. The same might be done using the {{Code|ln -s}} command to avoid having derived functionality, or better, place sources directly in the {{Code|~/Activities}} directory; | ||
* {{Code|fix_manifest}} | * {{Code|fix_manifest}} - function creates {{Code|MANIFEST}} file. Not having this file is not a failure, and Sweets is designed to have include/exclude rules in recipe files instead; | ||
* {{Code|install}} | * {{Code|install}} - function installs the activity to the root system. Sweets avoid, by design, any global changes during its regular behaviour. | ||
As regular {{Code|sweets}}'s commands, these | As regular {{Code|sweets}}'s commands, these commands need to be executed from the activity directory (or in any of its sub-directories, not just in the root), or the path to activity sources might be specified after the command name, e.g.: | ||
sweets build [PATH] | sweets build [PATH] | ||