Building a python application

Robert Bruce Park robert.park at canonical.com
Sun Mar 24 02:38:28 UTC 2013


On Sat, Mar 23, 2013 at 07:14:39PM -0700, Niranjan Rao wrote:
> My python code depends upon some python libraries, some of which are
> part ubuntu repository and I could install them using apt-get. There
> are other libraries which are not part of the repository and had to
> install using python PIP.

Well, if you want to create a .deb package to distribute your library,
you are going to also need to create a .deb package for the libraries
you are depending on, because apt has no way of depending on packages
from PIP. So if you only package your own app, nobody will be able to
install it because apt won't know how to install the dependencies.

> Not sure if I need to explicitly declare these
> dependencies while creating package

Yes, you will need to explicitly declare all your dependencies when
you are creating the package, otherwise apt won't ensure that all your
dependencies are present on the system, and then the situation you'll
run into is that people will install your app, and it won't work
because it's dependencies are missing, but the system won't realize
that anything is missing.

>  I am struggling with how to package all this. All the tutorial I
> came across did not cover this point. If someone can point me to
> right documents for creating PPA for python applications, especially
> covering the parts about dependencies, it will be great.

So a good start would be here:

http://wiki.debian.org/Courses2005/BuildingWithoutHelper#Creating_Debian_specific_files

That is a good overview of the different files needed in the debian/
directory and what their contents should look like.




More information about the Ubuntu-devel-discuss mailing list