Packaging in python

Allison Randal allison at lohutok.net
Wed Feb 22 19:16:56 UTC 2012


Hi Víctor,

On 02/22/2012 10:25 AM, Víctor Fernández wrote:
> Hi, Allison.
> Yes, is for Guallet. I saw the changes, but python isn't able to find
> gualletlib package. I don't know why.

Take a look at revision 38:

http://bazaar.launchpad.net/~allison/+junk/extras-guallet/revision/38

These changes tell Python to look in /opt/extras.ubuntu.com/guallet for
its own libraries, translation files, and glade files, but only when
it's been installed in /opt. (You can use
/opt/extras.ubuntu.com/guallet/ instead of
/opt/extras.ubuntu.com/guallet-0.1.10/. The version number is
unnecessary, and actually makes package updates a little more complicated.)

If you'd rather make these changes in a packaging patch, instead of in
the main source files, let me know, and I can walk you through that.

> Another thing: Is possible build a package with format 3.0 (quilt). When
> I try dpkg-buildpackage, it drops an error: it don't find the source.

Switching to "3.0 (quilt)" format was necessary to build with the
unusual version numbers used by Extras. It expects you to create the
tarball before you build the package, which setup.py can do for you:

python setup.py sdist

Then move the created tarball from the dist/ directory up to the
directory outside your bzr checkout:

mv dist/guallet-0.1.10.tar.gz ../.

> At
> that moment I'm being building with "dpkg-buildpackage -b -rfakeroot -us
> -uc". Is that correct?

Yes, the build command you're using is fine, and it works for me after
creating the tarball. There's also a simpler command, since you are
using bzr, and that is:

bzr builddeb

to build a binary package, or:

bzr builddeb -S

to build a source package. (This requires installing the bzr-builddeb
package.)

Allison



More information about the Ubuntu-app-devel mailing list