gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] gnumed not finding local db caused by not using corre


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gnumed not finding local db caused by not using correct config file
Date: Mon, 14 Jul 2008 14:06:12 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jul 14, 2008 at 01:42:28PM +0200, Florian Hubold wrote:

>>>>> When this is working, than the gnumed user for who i'm working on 
>>>>> this  problem can check.
>>>>> At the moment i can't login to the local db because i don't know 
>>>>> the  password,

> Not yet. Currently i'm re-doing the layout of the gnumed-server package.
> Does it matter whether gnumed-server is placed in /usr/lib/gnumed-server
> or as you wrote in /usr/lib/Gnumed-server or in /usr/lib/GNUmed-server?

It shouldn't, no. "GNUmed" is the "official" spelling so
that may be a point to consider (but not mandatory, of
course).

> My guess is that only the relative position of the symlink is important?
Correct.

> Another question is, why the symlink in the first place? For what is it  
> needed?
To make Python find the GNUmed modules. The bootstrapper can
run with either locally or globally installed modules.

Debian has a package gnumed-common which globally installs
the common GNUmed python modules such that both client and
server can find them (somewhere in /usr/.../site-packages).

Another approach is to do this as if one was doing this
manually after unpacking the tarball:

cd into the .../bootstrap/ directory and run the appropriate
shell script from there. The tarball contains all the needed
Python modules and also contains a symlink "Gnumed" at the
appropriate place. The scripts recreate that symlink just
for good measure ...

Now, why is the symlink necessary in the first place ?

Python modules are normally installed under site-packages/
or under a local directory. Inside each there will be
subdirectories for packages such as "Gnumed". This way
those subdirectories become namespaces in the Python world
and any Python script can do:

        from Gnumed import some_module

This "Gnumed" then needs to be found in the Python path
(sys.path from inside Python). Hence the Python-calling
GNUmed shell scripts put a symlink called "Gnumed" at the
appropriate level of the directory structure and also add
that directory to the Python path by including the directory
holding "Gnumed" into PYTHONPATH. The latter is an
environment variable read by the Python interpreter upon
startup which uses it to set its internal module lookup path
(accessible via sys.path from within Python).

Confused ?  I tried my best ;-)

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]