Search code examples
pythonubuntupackagelaunchpad

How do I package and add my Python app to my launchpad repository?


I have a launchpad account and an activated ppa but I have no idea how to package my app and upload. I write programs with Python using Tkinter. May someone explain ?


Solution

  • You'll need to package your project into a .deb. Here's a good tutorial:

    https://wiki.debian.org/Python/Packaging

    And here is an example packaged app which has TKinter as a dependency:

    http://packages.ubuntu.com/trusty/python-pil.imagetk

    Snippet from its control file:

    Source: pillow
    Section: python
    Priority: optional
    Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
    XSBC-Original-Maintainer: Matthias Klose <doko@debian.org>
    Build-Depends: debhelper, tk-dev, dpkg-dev (>= 1.16.1~),
      python-all-dev (>= 2.7.3-11~), python-all-dbg, python-setuptools,
      python3-all-dev (>= 3.3), python3-all-dbg, python3-setuptools,
      python-tk, python-tk-dbg, python3-tk, python3-tk-dbg (>= 3.3),
      libsane-dev, libfreetype6-dev, libjpeg8-dev, zlib1g-dev, liblcms2-dev,
      libwebp-dev
    Build-Conflicts: python-numarray
    Standards-Version: 3.9.5
    XS-Testsuite: autopkgtest