<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=201.75.7.138</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=201.75.7.138"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/201.75.7.138"/>
	<updated>2026-04-22T09:55:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=PyMaemo/Scratchboxless_packaging_guide&amp;diff=33519</id>
		<title>PyMaemo/Scratchboxless packaging guide</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=PyMaemo/Scratchboxless_packaging_guide&amp;diff=33519"/>
		<updated>2010-06-16T23:15:22Z</updated>

		<summary type="html">&lt;p&gt;201.75.7.138: /* Uploading to extras */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The usual way of developing Maemo applications is using or Scratchbox or [[MADDE]], which are quite heavy for Python development. An alternative is using [http://github.com/astraw/stdeb 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 [[extras-devel]] repository.&lt;br /&gt;
&lt;br /&gt;
This tutorial will show how to integrate it into your project, building the packages and uploading it to extras-devel.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This tutorial is aimed at Debian-based systems, as some stdeb commands requires the dpkg tools installed.&lt;br /&gt;
&lt;br /&gt;
Also, you should get the [http://github.com/astraw/stdeb git] version of stdeb to use the debianize command, as it is a new addition and not yet available in the repositories. Run the following commands to install it:&lt;br /&gt;
&lt;br /&gt;
 # Clone the git repository&lt;br /&gt;
 git clone http://github.com/astraw/stdeb.git&lt;br /&gt;
&lt;br /&gt;
 # Enter source package&lt;br /&gt;
 cd stdeb&lt;br /&gt;
&lt;br /&gt;
 # Build .deb (making use of stdeb package directory in sys.path).&lt;br /&gt;
 python setup.py --command-packages=stdeb.command bdist_deb&lt;br /&gt;
&lt;br /&gt;
 # Install it&lt;br /&gt;
 sudo dpkg -i deb_dist/python-stdeb_0.5.1+git-1_all.deb&lt;br /&gt;
&lt;br /&gt;
As only python2.5 is supported in pymaemo, it should be installed if you want to create binary packages. On Ubuntu Lucid (10.04), you can install it from [https://launchpad.net/~fkrull/+archive/deadsnakes this ppa], following the instructions [http://www.codigomanso.com/en/2010/05/google-app-engine-en--10-4-lucid-lynx/ here].&lt;br /&gt;
&lt;br /&gt;
== Preparing the package ==&lt;br /&gt;
&lt;br /&gt;
As stdeb extends distutils, it is necessary that you have a working setup.py script. For our example application, which consists of a [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript single script] named &amp;quot;myscript&amp;quot; and support files like [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript.desktop .desktop]&amp;lt;ref name=&amp;quot;desktop&amp;quot;&amp;gt;[[Desktop file format]]&amp;lt;/ref&amp;gt; and an [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript.png icon]&amp;lt;ref name=&amp;quot;icon&amp;quot;&amp;gt;[[Packaging#Displaying an icon in the Application Manager next to your package]]&amp;lt;/ref&amp;gt;, the [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/setup.py setup.py] will look like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils.core import setup&lt;br /&gt;
&lt;br /&gt;
setup(&lt;br /&gt;
    name=&#039;myscript&#039;,&lt;br /&gt;
    version=&#039;0.1&#039;,&lt;br /&gt;
    author=&#039;Lauro Moura&#039;,&lt;br /&gt;
    author_email=&#039;lauro.neto@donotspamme.com&#039;,&lt;br /&gt;
    scripts=[&#039;myscript&#039;],&lt;br /&gt;
    data_files=[(&#039;share/applications/hildon&#039;, [&#039;myscript.desktop&#039;]),&lt;br /&gt;
                (&#039;share/pixmaps&#039;, [&#039;myscript.png&#039;])],&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
A file named [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/stdeb.cfg stdeb.cfg] in the same directory as setup.py is required, with stdeb Maemo-specific options. A detailed list of options can be found in the [http://github.com/astraw/stdeb stdeb website].&lt;br /&gt;
&lt;br /&gt;
 [DEFAULT]&lt;br /&gt;
 XS-Python-Version: 2.5 # Only version currently supported by PyMaemo.&lt;br /&gt;
 Package:myscript # Binary package name. stdeb adds the prefix &amp;quot;python-&amp;quot; by default&lt;br /&gt;
 Section: user/development # Section should start with user/ to appear in the menu.&lt;br /&gt;
 Depends: python-gtk2 # extra dependencies go here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning 1&amp;lt;/b&amp;gt;: Make sure to use [[Maemo_packaging#Sections|an allowed section]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning 2&amp;lt;/b&amp;gt;: The &amp;lt;code&amp;gt;Depends&amp;lt;/code&amp;gt; field in stdeb.cfg will be used on your debian/control file, so fill it correctly with all the dependencies of your application - otherwise it will break when you try to install it. For instance, [http://gitorious.org/twcano/twcano twcano] depends on the following packages: &amp;lt;code&amp;gt;python-simplejson, pyside-qt4-maemo5, pyside-qt4-webkit and python-twitter&amp;lt;/code&amp;gt;, so the &amp;lt;code&amp;gt;Depends&amp;lt;/code&amp;gt; field should be filled this way:&lt;br /&gt;
&lt;br /&gt;
 Depends: python-simplejson, pyside-qt4-maemo5, pyside-qt4-webkit, python-twitter&lt;br /&gt;
&lt;br /&gt;
== Building the packages ==&lt;br /&gt;
&lt;br /&gt;
The basic command is&lt;br /&gt;
&lt;br /&gt;
 python setup.py --command-packages=stdeb.command bdist_deb&lt;br /&gt;
&lt;br /&gt;
It&#039;ll create a folder called deb_dist with the source and binary packages. Alternatively, the &amp;quot;sdist_dsc&amp;quot; command will create only the source package.&lt;br /&gt;
&lt;br /&gt;
After generating, you can copy the package to your device and install it (requires an [[SSH]] server):&lt;br /&gt;
&lt;br /&gt;
 $ scp myscript_0.1-1_all.deb root@&amp;lt;n900 ip&amp;gt;:/root&lt;br /&gt;
 $ ssh root@&amp;lt;n900 ip&amp;gt;&lt;br /&gt;
 # dpkg -i myscript_0.1-1_all.deb&lt;br /&gt;
&lt;br /&gt;
== Building a basic debian directory ==&lt;br /&gt;
&lt;br /&gt;
Another useful command is &#039;&#039;debianize&#039;&#039;. It will read the configuration file and write a directory named debian in the same directory. This can be used for manually creating the packages using dpkg tools directly. For a detailed usage example see the [http://github.com/astraw/stdeb#debianize-distutils-command steb website].&lt;br /&gt;
&lt;br /&gt;
Note: sdist_dsc and bdist_deb do &#039;&#039;&#039;not&#039;&#039;&#039; use this directory, generating a new one in the source dir under deb_dist/.&lt;br /&gt;
&lt;br /&gt;
== Uploading to extras ==&lt;br /&gt;
&lt;br /&gt;
To upload to extras, use the debianize command and then call dpkg-buildpackage:&lt;br /&gt;
&lt;br /&gt;
 $ dpkg-buildpackage -rfakeroot -uc -us -S&lt;br /&gt;
&lt;br /&gt;
This command will create the .dsc, .tar.gz and .changes files that can be used to [[uploading to Extras-devel|upload the application to extras-devel]].&lt;br /&gt;
&lt;br /&gt;
== Future work ==&lt;br /&gt;
&lt;br /&gt;
Support for non-Debian systems.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:Packaging]]&lt;/div&gt;</summary>
		<author><name>201.75.7.138</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=PyMaemo/Scratchboxless_packaging_guide&amp;diff=33520</id>
		<title>PyMaemo/Scratchboxless packaging guide</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=PyMaemo/Scratchboxless_packaging_guide&amp;diff=33520"/>
		<updated>2010-06-16T23:14:37Z</updated>

		<summary type="html">&lt;p&gt;201.75.7.138: /* Preparing the package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The usual way of developing Maemo applications is using or Scratchbox or [[MADDE]], which are quite heavy for Python development. An alternative is using [http://github.com/astraw/stdeb 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 [[extras-devel]] repository.&lt;br /&gt;
&lt;br /&gt;
This tutorial will show how to integrate it into your project, building the packages and uploading it to extras-devel.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This tutorial is aimed at Debian-based systems, as some stdeb commands requires the dpkg tools installed.&lt;br /&gt;
&lt;br /&gt;
Also, you should get the [http://github.com/astraw/stdeb git] version of stdeb to use the debianize command, as it is a new addition and not yet available in the repositories. Run the following commands to install it:&lt;br /&gt;
&lt;br /&gt;
 # Clone the git repository&lt;br /&gt;
 git clone http://github.com/astraw/stdeb.git&lt;br /&gt;
&lt;br /&gt;
 # Enter source package&lt;br /&gt;
 cd stdeb&lt;br /&gt;
&lt;br /&gt;
 # Build .deb (making use of stdeb package directory in sys.path).&lt;br /&gt;
 python setup.py --command-packages=stdeb.command bdist_deb&lt;br /&gt;
&lt;br /&gt;
 # Install it&lt;br /&gt;
 sudo dpkg -i deb_dist/python-stdeb_0.5.1+git-1_all.deb&lt;br /&gt;
&lt;br /&gt;
As only python2.5 is supported in pymaemo, it should be installed if you want to create binary packages. On Ubuntu Lucid (10.04), you can install it from [https://launchpad.net/~fkrull/+archive/deadsnakes this ppa], following the instructions [http://www.codigomanso.com/en/2010/05/google-app-engine-en--10-4-lucid-lynx/ here].&lt;br /&gt;
&lt;br /&gt;
== Preparing the package ==&lt;br /&gt;
&lt;br /&gt;
As stdeb extends distutils, it is necessary that you have a working setup.py script. For our example application, which consists of a [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript single script] named &amp;quot;myscript&amp;quot; and support files like [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript.desktop .desktop]&amp;lt;ref name=&amp;quot;desktop&amp;quot;&amp;gt;[[Desktop file format]]&amp;lt;/ref&amp;gt; and an [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/myscript.png icon]&amp;lt;ref name=&amp;quot;icon&amp;quot;&amp;gt;[[Packaging#Displaying an icon in the Application Manager next to your package]]&amp;lt;/ref&amp;gt;, the [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/setup.py setup.py] will look like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from distutils.core import setup&lt;br /&gt;
&lt;br /&gt;
setup(&lt;br /&gt;
    name=&#039;myscript&#039;,&lt;br /&gt;
    version=&#039;0.1&#039;,&lt;br /&gt;
    author=&#039;Lauro Moura&#039;,&lt;br /&gt;
    author_email=&#039;lauro.neto@donotspamme.com&#039;,&lt;br /&gt;
    scripts=[&#039;myscript&#039;],&lt;br /&gt;
    data_files=[(&#039;share/applications/hildon&#039;, [&#039;myscript.desktop&#039;]),&lt;br /&gt;
                (&#039;share/pixmaps&#039;, [&#039;myscript.png&#039;])],&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
A file named [http://pymaemo.garage.maemo.org/stdeb_example/myscript-app/stdeb.cfg stdeb.cfg] in the same directory as setup.py is required, with stdeb Maemo-specific options. A detailed list of options can be found in the [http://github.com/astraw/stdeb stdeb website].&lt;br /&gt;
&lt;br /&gt;
 [DEFAULT]&lt;br /&gt;
 XS-Python-Version: 2.5 # Only version currently supported by PyMaemo.&lt;br /&gt;
 Package:myscript # Binary package name. stdeb adds the prefix &amp;quot;python-&amp;quot; by default&lt;br /&gt;
 Section: user/development # Section should start with user/ to appear in the menu.&lt;br /&gt;
 Depends: python-gtk2 # extra dependencies go here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning 1&amp;lt;/b&amp;gt;: Make sure to use [[Maemo_packaging#Sections|an allowed section]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Warning 2&amp;lt;/b&amp;gt;: The &amp;lt;code&amp;gt;Depends&amp;lt;/code&amp;gt; field in stdeb.cfg will be used on your debian/control file, so fill it correctly with all the dependencies of your application - otherwise it will break when you try to install it. For instance, [http://gitorious.org/twcano/twcano twcano] depends on the following packages: &amp;lt;code&amp;gt;python-simplejson, pyside-qt4-maemo5, pyside-qt4-webkit and python-twitter&amp;lt;/code&amp;gt;, so the &amp;lt;code&amp;gt;Depends&amp;lt;/code&amp;gt; field should be filled this way:&lt;br /&gt;
&lt;br /&gt;
 Depends: python-simplejson, pyside-qt4-maemo5, pyside-qt4-webkit, python-twitter&lt;br /&gt;
&lt;br /&gt;
== Building the packages ==&lt;br /&gt;
&lt;br /&gt;
The basic command is&lt;br /&gt;
&lt;br /&gt;
 python setup.py --command-packages=stdeb.command bdist_deb&lt;br /&gt;
&lt;br /&gt;
It&#039;ll create a folder called deb_dist with the source and binary packages. Alternatively, the &amp;quot;sdist_dsc&amp;quot; command will create only the source package.&lt;br /&gt;
&lt;br /&gt;
After generating, you can copy the package to your device and install it (requires an [[SSH]] server):&lt;br /&gt;
&lt;br /&gt;
 $ scp myscript_0.1-1_all.deb root@&amp;lt;n900 ip&amp;gt;:/root&lt;br /&gt;
 $ ssh root@&amp;lt;n900 ip&amp;gt;&lt;br /&gt;
 # dpkg -i myscript_0.1-1_all.deb&lt;br /&gt;
&lt;br /&gt;
== Building a basic debian directory ==&lt;br /&gt;
&lt;br /&gt;
Another useful command is &#039;&#039;debianize&#039;&#039;. It will read the configuration file and write a directory named debian in the same directory. This can be used for manually creating the packages using dpkg tools directly. For a detailed usage example see the [http://github.com/astraw/stdeb#debianize-distutils-command steb website].&lt;br /&gt;
&lt;br /&gt;
Note: sdist_dsc and bdist_deb do &#039;&#039;&#039;not&#039;&#039;&#039; use this directory, generating a new one in the source dir under deb_dist/.&lt;br /&gt;
&lt;br /&gt;
== Uploading to extras ==&lt;br /&gt;
&lt;br /&gt;
To upload to extras, use the debianize command and then call dpkg-buildpackage:&lt;br /&gt;
&lt;br /&gt;
 $ dpkg-buildpackage -rfakeroot -uc -us -S&lt;br /&gt;
&lt;br /&gt;
This command will create the .dsc, .tar.gz and .changes files that can be used to [[uploading to Extras-devel|upload the application to extras-devel]]&lt;br /&gt;
&lt;br /&gt;
== Future work ==&lt;br /&gt;
&lt;br /&gt;
Support for non-Debian systems.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;br /&gt;
[[Category:Packaging]]&lt;/div&gt;</summary>
		<author><name>201.75.7.138</name></author>
	</entry>
</feed>