>>>

true stories from the interpreter

7.16.2006

Releases, Name Changes, User Guides, and Debs

First, I'd like to announce that new versions of all of my progress so far (pyeducation, amenity, amenity-teacher, amenity-student) have been released. For more details please see the announcements on the Pyeducation Blog or go straight to downloading at the Sourceforge Project Page.

On Friday I was confronted with a problem. The name that I chose for the quiz/exam program (Pike) is also the name of an interpreted programming language. I needed a new name! I couldn't think of anything right away, and I was mentally unable to code any more on the project until it had a new name. In the interim I started working more on the User Guide for the Amenity Teacher Client.

Saturday, we had another sprint in the URL. I dedicated the day to finishing the manual and finally figuring out how to make Debian packages. I finished the manual (this is the first manual of any type that I've ever written, so I'm sure it'll be updated and upgraded in the future).

Around noon we took a break for lunch at Subway (the meatball mozzarella sub is delish by the way). And while listening to Marc and Zap talk about Panic's software Unison, Transmit, and Desktastic, it hit me. I knew that the new name for Pike had to be good. Now, it may not be as catchy as Desktastic or Candybar, but it's good. What is this new name? Quizzical. Oh yes, I am proud of this one. I think this name is even better than the name for my Gnome Flickr Uploader (which also came to me in such a moment) - Thingr.

So after the manual was done and the name was picked, all that was left was to figure out how to make Debian Packages. I had tried to follow a few tutorials on how to make Debian packages, but something just didn't seem right. By chance I came across this blog post during a search which helped me so much.

So adapted from the post I found, here is my guide to making a Debian Package from a Python package. For this example, imaginate (in an Imaginarium if at all possible) that you are packaging "packagename" with version "version". Also remember that when I say package I am referring to a source package made with setup.py.

# cd to the directory where the Python package is and make a packaging directory
mkdir packaging

# unpack the package and cd to it
tar -xzf packagename-version.tar.gz
cd packagename-version

# build a dumb build distribution
python setup.py bdist_dumb

# copy the dumb build (whatever name it was generated with) to the packaging directory, and change to the packaging directory
cp dist/packagename-version-linux-i686.tar.gz ../packaging/
cd ../packaging/

# make a directory for the package, this also will be the name of your package
mkdir packagename-version-0ubuntu1

# unpack the dumb build and mv the unpacked contents to the package directory
tar -xzf packagename-version-linux-i686.tar.gz
mv usr packagename-version-0ubuntu1/

# make a DEBIAN directory for your package
mkdir packagename-version-0ubuntu1/DEBIAN

# use your preferred editor to create a control file
vim packagename-version-0ubuntu1/DEBIAN/control
Your control file should look something like the following, just replace the values with the appropriate info for your package.
Package: packagename
Version: version-0ubuntu1
Section: unknown
Priority: optional
Architecture: i386
Depends: python
Installed-Size: 156
Maintainer: Your name <your email>
Description: A short description of packagename
You should also create any other files your package needs (preinst, postinst, prerm, postrm, etc).

When everything is read run the command `dpkg-deb --build packagename-version-0ubuntu1`

If everything worked, packagename-version-0ubuntu1.deb should have been created in your packaging directory.

It's just that easy. Alright, I'm done for the day. Tomorrow I'll start string replacing Pike with Quizzical where I can and continue working on the code for it.

^D

0 Comments:

Post a Comment

<< Home