python packaging - icons/desktop files and /usr/bin accessibility

Mary Ellen Foster foster at in.tum.de
Mon May 5 14:57:20 UTC 2008


On Mon, May 5, 2008 at 1:32 PM, David Timms <dtimms at iinet.net.au> wrote:
> I'm packaging a basic python program, and request some guidance:
>
>  1. the app has three main .py programs, and another 10 or so .py modules.
> My installed rpm puts these in site-packages/appname which I understand the
> guidelines to require. Problem is these are not accessible as a user because
> they aren't on the path.
>  So it works if I /usr/lib/python../site-packages/myapp/app1.py
>
>  Should I be messing with the path ?
>  Creating a shell script for each of the main programs, and dropping them in
> /usr/bin ?

Note that if you want the libraries to be available to Python, as far
as I understand it, the standard way to do this is to a "*.pth" file
and put it into site-packages. For example, for my package (which puts
files into an "Ice" subdirectory), I created a file called ice.pth
containing only the following:
    Ice
For yours, you probably want to create "myapp.pth" containing the line
"myapp" and install that into site-packages.

This doesn't answer the question of how to run the programs, though, of course.

MEF

-- 
Mary Ellen Foster -- http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh




More information about the fedora-devel-list mailing list