[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python packaging



On Tue, Sep 15, 2009 at 03:21:41PM +0200, Alessandro Dentella wrote:
> On Tue, Sep 15, 2009 at 09:27:23AM +0200, Julian Andres Klode wrote:
> > On Tue, Sep 15, 2009 at 09:12:54AM +0200, Alessandro Dentella wrote:
> > > On Tue, Sep 15, 2009 at 07:02:23AM +0200, Adrian von Bidder wrote:
> > > > -> Policy says I should ship my (private) modules in /usr/share/<appname>.  
> > > > How will Python find the modules?
> > > 
> > > i guess you must patch your application to add that to sys.path...
> > 
> > Installing scripts into /usr/share/<appname> and symlinking them
> > to /usr/{s,}bin is a bit easier.
> 
> He was talking about private modules that should be found by
> python. Symlinking to /usr/{S,}bin wouldn't be any usefull in my opinion.
I should have written "symlinking from" and not "symlinking to".

If you install the modules in /usr/share/<appname>/ and the script too, and
then create a symlink in /usr/{s,}bin pointing to your script, python will
automatically find the modules. That's the way I do it in my packages, e.g.
gnome-app-install.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


Reply to: