PyMaemo/Scratchboxless packaging guide: Difference between revisions
imported>lmoura mNo edit summary |
imported>lmoura |
||
| Line 5: | Line 5: | ||
This tutorial will show how to integrate it into your project, building the packages and uploading it to extras-devel. | This tutorial will show how to integrate it into your project, building the packages and uploading it to extras-devel. | ||
= | = Preparing the package = | ||
As stdeb extends distutils, it is necessary that you have a working setup.py script. | As stdeb extends distutils, it is necessary that you have a working setup.py script. For our example application, which consists of a single script named "myscript" and support files like .desktop and an icon, the setup.py will look like this: | ||
from distutils.core import setup | |||
setup( | |||
name='myscript', | |||
author='Lauro Moura', | |||
author_email='lauro.neto@donotspamme.com', | |||
scripts=['myscript'], | |||
data_files=[('share/applications/hildon', ['myscript.desktop']), | |||
('share/pixmaps', ['myscript.png'])], | |||
) | |||
A file named stdeb.cgf in the same directory as setup.py is required, with stdeb maemo-specific options. | |||
[DEFAULT] | |||
XS-Python-Version: 2.5 # Only version currently supported by pymaemo. | |||
Package:myscript # Binary package name. stdeb adds the prefix "python-" by default | |||
Section: user/other # Section should start with user/ to appear in the menu. | |||
= Building a binary package = | = Building a binary package = | ||
Revision as of 19:30, 11 June 2010
Introduction
The usual way of developing Maemo applications is using or Scratchbox or MADDE, which are quite heavy for Python development. An alternative is using stdeb, a set of extensions to distutils that allows generating debian packages, both binary and source, that can be installed on the device or sent to the extra-devel repository.
This tutorial will show how to integrate it into your project, building the packages and uploading it to extras-devel.
Preparing the package
As stdeb extends distutils, it is necessary that you have a working setup.py script. For our example application, which consists of a single script named "myscript" and support files like .desktop and an icon, the setup.py will look like this:
from distutils.core import setup
setup(
name='myscript',
author='Lauro Moura',
author_email='lauro.neto@donotspamme.com',
scripts=['myscript'],
data_files=[('share/applications/hildon', ['myscript.desktop']),
('share/pixmaps', ['myscript.png'])],
)
A file named stdeb.cgf in the same directory as setup.py is required, with stdeb maemo-specific options.
[DEFAULT] XS-Python-Version: 2.5 # Only version currently supported by pymaemo. Package:myscript # Binary package name. stdeb adds the prefix "python-" by default Section: user/other # Section should start with user/ to appear in the menu.
Building a binary package
Building a souce package
Uploading to extras
Future work
Support for non-debian systems.