Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Karsten Hilbert
On Thu, Feb 19, 2009 at 08:19:00AM +0100, RKI Andreas wrote: * Make /usr/bin/gnumed a python script, rewriting the environment manipulations in python; this makes the import trivial. What means trivial. The trivial seems to come about by the misbelief that our module imports

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Andreas Tille
On Thu, 19 Feb 2009, Karsten Hilbert wrote: The trivial seems to come about by the misbelief that our module imports somehow use GNUMEDDIR which they do not. That's only used to access gnumed.py, nothing else. gnumed(.sh) is there exactly to *be* a shell wrapper around gnumed.py to allow the

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Josselin Mouette
Hi, Le jeudi 19 février 2009 à 08:19 +0100, Andreas Tille a écrit : * Detect the modules location dynamically from the script. You can see an example in the pychecker package. Looking more closely, there is an even simpler way than that of pychecker. Something like this should

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Karsten Hilbert
On Thu, Feb 19, 2009 at 09:34:15AM +0100, Josselin Mouette wrote: I don’t have one handy, but the idea is to consider it a regular script. Looking more closely at gnumed.py, it occurs to me that it is not even meant to be in a modules directory: if __name__ != __main__:

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Josselin Mouette
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

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-19 Thread Karsten Hilbert
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

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-18 Thread Josselin Mouette
Package: gnumed-client Version: 0.3.10-1 Severity: important Hi, the gnumed-client package uses a hard-coded path to the python modules: GNUMEDDIR=/var/lib/python-support/python${PYVER}/Gnumed/wxpython However, because of numerous requests from developers, the installation path for

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-18 Thread Karsten Hilbert
On Thu, Feb 19, 2009 at 12:03:41AM +0100, Josselin Mouette wrote: the gnumed-client package uses a hard-coded path to the python modules: GNUMEDDIR=/var/lib/python-support/python${PYVER}/Gnumed/wxpython Nope. It just uses this path to start the gnumed.py. All module imports are

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-18 Thread Andreas Tille
On Thu, 19 Feb 2009, Josselin Mouette wrote: the gnumed-client package uses a hard-coded path to the python modules: GNUMEDDIR=/var/lib/python-support/python${PYVER}/Gnumed/wxpython However, because of numerous requests from developers, the installation path for these modules is going

Bug#516037: gnumed-client: hard-codes the location to python modules

2009-02-18 Thread Andreas Tille
On Thu, 19 Feb 2009, Karsten Hilbert wrote: * Move part or all of the files to a private modules directory. Hopefully we can find another way. IMHO this is the less invasive option and might keep the modules at the place where you put them upstream - at least if I understood the