2

I have a python3 script (4000 loc) written in PyQt4 with four, five dependencies. In the same folder where that script is placed there are some subfolders where all additional files (icons, saves, sounds, translations) are placed.

I want to upload it to my a ppa which I had already created. I've read "Uploading a package to a ppa" but I don't understand it.

Is there any step-by-step instruction for beginners? It seems harder to me to create a ppa than writing the whole program.

3
  • @hbdgaf "Creating a PPA" is different than "Creating a Package to Upload to a PPA." Just creating the PPA is insufficient, you also need to have knowledge of packaging to do this, or make your app with Quickly.
    – Thomas Ward
    Aug 30, 2013 at 21:11
  • What exactly does your script do? Did you create the script/program using Quickly, or by hand?
    – Thomas Ward
    Aug 30, 2013 at 21:12
  • No I totally wrote it by hand using PyQt4 and wrote it in IDLE. It includes pyqt4-phonon, other pyqt4 dependencies and wmctrl. It is a GUI-program that fetches data from the subdirectories. Aug 30, 2013 at 21:14

1 Answer 1

4

Your confusion from all the existing guides is something probably every developer who wants to create a package for their ppa had experienced once. It is immanent to the complexity of building DEBIAN packages, and because of the many paths you can go to get there. Because of this you will not find a step by step guide which is as easy as you may want it to be now.

What we can do here is to give you an idea on where to start to learn how to make a package ready for uploading to your ppa.

  1. Learn how to make a DEBIAN package

    This is the first giant leap to take. Without an understanding on how a DEB package works you will not be able to fill your ppa. We do have some good answers to qestions here already:

    Most of all it is important you learn from others. Download source packages and look how people did it there. You may even want to modify an exisiting package and use it as a template for your own.

  2. Make your own DEBIAN package

    Only after we are familiar with the structure and files a DEBIAN package needs to build it makes sense to try out ourselves. There are some good articles with special reference to Ubuntu which I recommend reading:

    You again may want to try out the procedures and applications needed for building a package on a downloaded source of another package before you proceed with your own.

  3. Learn from errors

    You will see thousands of errors once you started to build a package from your own application. Do not take any of them lightly. Try to understand them and most importantly fix them step by step. This is where you will spend most time with reading packaging guides and DEBIAN policies.

  4. Test your package

    After you suceeded with your own package you should test if it installs correctly. I recommend doing this in a VM for different versions, and to be able to revert any unwanted side effects. Also do run Lintian on your package to reveal errors and warnings. All these need to be fixed to get you package accepted for upload on your ppa later.

  5. Upload to your ppa

    In addition to exisiting answers I linked to above there is a good guide on Launchpad on how to create a ppa and upload to it. Read and follow it to avoid frustration:

  6. Understand and fix the errors you may get after your first upload.

Once you actually started to not only read but to really package something you will soon find that most of your present confusion will eventually lead to knowledge. Don't give up too early. Once you see how it works it is getting easier and easier.

Look at it as if it were game where you need to solve one puzzle after the other to reach the next level.

2
  • Ok thanks, gotta find some time to dive in the docs. I've already read your point 1 "for a single python script" and wondered how to include folders. Moreover I've already tried to download and try something out, like this here: pypi.python.org=>stdeb after "Quickstart 3". But already after the second line there is an error in my terminal, thought that should run out of box.: stdeb.util.CalledProcessError: 2 ERROR running: /usr/bin/python setup.py --command-packages stdeb.command sdist_dsc ... ` Aug 30, 2013 at 22:59
  • Well, the PyPi way sounds easy which it is not. It may help you for PyPi but it will not easily make a source for uploading to your ppa. Do have a look at how other packages do it, really. It will tell you more than 100 guides.
    – Takkat
    Aug 31, 2013 at 8:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .