Image

Imagesymmys wrote in Imagepython_dev

Python installation/distribution

Can anyone recommend a good tutorial or FAQ for creating distributions of python programs? Currently, I'm thinking about creating packages of my recipe program which is, for the time being, only written for the Gnome platform, but I could envision creating a gnome-less pure gtk version for windows/mac, so it would be useful to learn about tools that make it easier to create mac & windows installers as well.


I want to learn the right way to do the following:



  • Create a setup.py file

  • Reference icons, images, and other standard data for my program which will be put in some place like /usr/share/, /usr/local/, etc. depending on the setup

  • Create a .deb and .rpm installer packages

  • Put my program into the right menu heirarchies

  • I'm imagining that many of these are really separate skills -- that I'll have to learn the debian menu system and the setup.py syntax and the RPM rules, etc., but before I dig into debian and rpm docs, I want to make sure I'm making use of the right python tools wherever possible. Most obviously, I need to figure out the right way to pass the paths of important files and/or libraries to my program (I notice, for example, that Straw and other pygtk apps put there python libraries into /usr/lib/straw/ on debian and not into /usr/lib/python/site-packages/straw/, which means the program has to add the correct location to its path).


    I'm aware all of this information must be on the web, but I haven't found an easy-to-use guide to get me started (this is the first time I've wanted to send one of my programs beyond my local ~/bin/!).