{"id":15163130,"url":"https://github.com/brvier/pypackager","last_synced_at":"2026-02-26T12:03:01.245Z","repository":{"id":2648462,"uuid":"3638595","full_name":"brvier/PyPackager","owner":"brvier","description":"PyPackager is an onboard developpers tools which is usefull to create sources and binary Maemo package.","archived":false,"fork":false,"pushed_at":"2014-11-15T11:22:24.000Z","size":283,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T19:57:39.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://khertan.net/softwares/PyPackager/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brvier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-06T14:20:44.000Z","updated_at":"2014-11-15T11:22:25.000Z","dependencies_parsed_at":"2022-09-24T04:50:29.984Z","dependency_job_id":null,"html_url":"https://github.com/brvier/PyPackager","commit_stats":null,"previous_names":["khertan/pypackager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brvier/PyPackager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brvier%2FPyPackager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brvier%2FPyPackager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brvier%2FPyPackager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brvier%2FPyPackager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brvier","download_url":"https://codeload.github.com/brvier/PyPackager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brvier%2FPyPackager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264005558,"owners_count":23542834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T02:04:10.752Z","updated_at":"2025-12-14T03:01:07.060Z","avatar_url":"https://github.com/brvier.png","language":"Python","readme":"PyPackager\n==========\n\n**Licence :** GPLv3\n**Source :** [GitHub Repository](https://github.com/khertan/pypackager)\n**Download (Maemo):** [PyPackager on Maemo Repository](http://maemo.org/packages/view/pypackager/)\n**Download (Meego):** [PyPackager on MeeGo Repository](http://repo.pub.meego.com/home:/khertan/Harmattan/armel/)\n**Bugs Tracker :** [PyPackager Bug Tracker](https://github.com/khertan/pypackager/issues)\n**Plateform :** Maemo Diablo, Maemo Fremantle\n\nPyPackager is an onboard developpers tools which is usefull to create sources\nand binary Maemo package.\n\n![PyPackager Source screenshot](http://khertan.net/medias/pypackager.jpg)\n\n## PyPackager HowTo\n\nOn the maemo platform, software is distributed using the Debian package\nsystem. If you don't develop in Scratchbox, but directly on the device, you\nneed a tool to properly put together your software for distribution as such a\n.deb package. To solve this, i've created PyPackager. PyPackager 3.x.x is the\nsame as Py2Deb, except that with the same script you can prepare package to be\nuploaded to the extras maemo builder or build a debian package for maemo\ndirectly on your device.\n\n## Install PyPackager\n\nLast version of pypackager is available in Maemo Extras-devel, so you can\ninstall it with the application Manager.\n\n## Prerequisites\n\nCreate a folder /myapp under your home folder (e.g. ”/home/user/myapp”). Then\nadd the following files and folders: * A subfolder /src that contains all your\nsource files in a folder structure which represents the way your app files\nwill install on the device - and with the correct permissions set (so do not\nuse the fat partition ~/MyDocs)! * The icon for your software package (e.g.\nmyapp.png, 48×48 pixels), the one that will be visible for your package in the\napplication manager. * And the make.py file\n\n## programs and libraries with distutils\n\nIf you want to package a python program or library that is set up correctly\nwith distutils, you can use\n\n    \n    $ python setup.py bdist_dumb\n\nto compile and generate a .tar.gz package in dist/ subdirectory. Just unpack\nthat package in the src/ folder and add the hildon desktop integration files\n(see below) there.\n\n## Example /src folder structure\n\nFiles needed for the Hildon desktop integration:\n\n    \n    /src/usr/share/applications/hildon/myapp.desktop\n    /src/usr/share/dbus-1/services/myapp.service\n    /src/usr/share/icons/hicolor/48x48/hildon/myapp.png\n    /src/usr/share/icons/hicolor/scalable/hildon/myapp.png (64x64 pixel)\n\n## myapp.desktop file\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n    [Desktop Entry]\n    Version=1.0.0\n    Encoding=UTF-8\n    Name=myApp\n    Comment=Clock \u0026 day/night map\n    Exec=/opt/myApp/myApp.py\n    Icon=myapp\n    X-Icon-path=/usr/share/icons\n    X-Window-Icon=myapp\n    Type=Application\n    X-Osso-Service=net.khertan.myapp\n    X-Osso-Type=application/x-executable\n    StartupWMClass=myApp\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*Version* is version of the desktop file, NOT of the app. Keep it at 1.0.0\n*Name* is Name of the app as seen in Menu\n*Description* is Description of the app as seen as subtitle in Menu in Finger\nmode\n*Exec* is link to the app\n*Icon* is Name of our icon file, without the trailing .png part\n*X-Icon-path* is Path to the icon\n*X-Window-Icon* is Name of our icon file, without the trailing .png part\n*StartupWMClass* is only needed because if it programs use direct screen\nrendering librairy like PyGame, XLib or OpenGL.\n\nNote that you need the X-Osso-Service line only if you actually use osso\nservices. Including that line in the .desktop file without proper handling of\nosso events in the application will result in the application being terminated\nshortly after startup.\n\n##myapp.service\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n    [D-BUS Service]\n    Name=net.khertan.myapp\n    Exec=/opt/myApp/myApp.py Link to the app\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n## Files of the application itself\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n    /src/opt/myApp\n    /src/opt/myApp/myApp.py\n    /src/opt/myApp/myApp_other_class.py\n    /src/opt/myApp/datas/myApp_image.png\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nmyApp.py should begin with:\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n    #!/usr/bin/env python\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nand be executable\n\n## Setup the build_myapp.py code\n\nCopy the following code to create your own build_myapp.py, then edit according\nto your needs:\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n    #!/usr/bin/python\n    # -*- coding: utf-8 -*-\n    ## This program is free software; you can redistribute it and/or modify\n    ## it under the terms of the GNU General Public License as published\n    ## by the Free Software Foundation; version 2 only.\n    ##\n    ## This program is distributed in the hope that it will be useful,\n    ## but WITHOUT ANY WARRANTY; without even the implied warranty of\n    ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n    ## GNU General Public License for more details.\n    ##\n    import pypackager\n    import os\n     \n    if __name__ == \"__main__\":\n        try:\n            os.chdir(os.path.dirname(sys.argv[0]))\n        except:\n            pass\n     \n        p=pypackager.PyPackager(\"khteditor\")\n        p.version='0.0.1'\n        p.buildversion='1'\n        p.display_name='KhtEditor'\n        p.description=\"KhtEditor is a source code editor specially designed for devices running Maemo and Meego Handset.\"\n        p.author=\"Benoît HERVIER\"\n        p.maintainer=\"Khertan\"\n        p.email=\"khertan@khertan.net\"\n        p.depends = \"python2.5-qt4-gui,python2.5-qt4-core, python2.5-qt4-maemo5\"\n        p.suggests = \"pylint\"\n        p.section=\"user/development\"\n        p.arch=\"armel\"\n        p.urgency=\"low\"\n        p.bugtracker='http://khertan.net/flyspray/index.php?project=7'\n        p.distribution=\"fremantle\"\n        p.repository=\"extras-devel\"\n        p.icon='khteditor.png'\n        p[\"/usr/bin\"] = [\"khteditor_launch.py\",]\n        p[\"/usr/share/dbus-1/services\"] = [\"khteditor.service\",]\n        p[\"/usr/share/pixmaps\"] = [\"khteditor.png\",]\n        p[\"/usr/share/applications/hildon\"] = [\"khteditor.desktop\",]\n        #Specific flags for meego\n        p.maemo_flags = 'visible'\n        p.meego_desktop_entry_filename = ''\n        p.createDigsigsums = True\n        p.aegisManifest = '''\u003caegis name=\"...\"\u003e\n          \u003cprovide\u003e\u003c/provide\u003e\n          \u003cconstraint\u003e\u003c/constraint\u003e\n          \u003caccount\u003e\u003c/account\u003e\n          \u003crequest\u003e\u003c/request\u003e\n          \u003cdomain\u003e\u003c/domain\u003e\n          \u003cdocstring\u003e\u003c/docstring\u003e\n        \u003c/aegis\u003e'''\n        files = []\n     \n        #Src\n        for root, dirs, fs in os.walk('/home/user/MyDocs/Projects/khteditor/khteditor'):\n          for f in fs:\n            #print os.path.basename(root),dirs,f\n            prefix = 'khteditor/'\n            if os.path.basename(root) != 'khteditor':\n                prefix = prefix + os.path.basename(root) + '/'\n            files.append(prefix+os.path.basename(f))\n        print files\n     \n     \n        p[\"/usr/lib/python2.5/site-packages\"] = files\n     \n        p.postinst = \"\"\"#!/bin/sh\n    chmod +x /usr/bin/khteditor_launch.py\n    python -m compileall /usr/lib/python2.5/site-packages/khteditor\"\"\"\n     \n        p.changelog=\"\"\"First Release\n    \"\"\"\n     \n    print p.generate(build_binary=False,build_src=True)\n    #print p.generate(build_binary=True,build_src=True)\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n## Run your make.py code\n\nOpen “X Terminal” on your device and change directory into your folder (e.g.\n“cd /home/user/myapp”). Then run your code using “python2.5 make.py” in Xterm.\nPyPackager will now package your files. Once this is done successfully,\ndepending on build option your ~/myapp folder will contain new files ready to\nbe uploaded to Maemo Auto Builder or ready to be upload to your own repository\n  * myapp_0.5.6-1.changes (the changelog)\n  * myapp_0.5.6-1.dsc (the package\ndescription)\n  * myapp_0.5.6-1.tar.gz (the packed source files)\n\nThis article is derivate from the [http://wiki.maemo.org/Py2Deb](http://wiki.maemo.org/Py2Deb) page. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrvier%2Fpypackager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrvier%2Fpypackager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrvier%2Fpypackager/lists"}