[Debian-med-packaging] Bug#516037: gnumed-client: hard-codes the location to python modules

Josselin Mouette joss at debian.org
Thu Feb 19 08:54:55 UTC 2009


Le jeudi 19 février 2009 à 09:47 +0100, Karsten Hilbert a écrit :
> > This is very simple, just ship the modules to /usr/share/gnumed-client,
> > and modify your script to do something like:
> >         import sys
> >         sys.path.append("/usr/share/gnumed-client")
> >         import Gnumed.whatyouwant
> 
> What GNUmed currently does is:
> 
> 	import Gnumed.whatyouwant
> 
> and expect to *just find* its modules in sys.path - which is
> AFAICT the right thing to do and works cross platform. This
> runs on all flavours of Linux plus Windows plus MacOSX so
> I'm not going to hardcode *something else* right into my
> Python scripts which is specific to Linux or even Debian.

There is nothing specific in using a private modules directory.
Actually, if the modules are not useful to anything else outside Gnumed,
there’s no reason to put them in a public path, where they can be
accessed by any other Python application.

> No, if something is hardcoded or dynamically adjusted it
> should really be in an OS-level wrapper around gnumed.py
> such as a shell script.

I fail to see any difference between doing it in shell or in python. If
you want to do what I wrote earlier in shell, just modify PYTHONPATH to
the privates module directory, and that’s all.

-- 
 .''`.      Debian 5.0 "Lenny" has been released!
: :' :
`. `'   Last night, Darth Vader came down from planet Vulcan and told
  `-    me that if you don't install Lenny, he'd melt your brain.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20090219/944dc0ff/attachment-0003.pgp 


More information about the Debian-med-packaging mailing list