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 15:42:01 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Jul 14, 2008 at 03:10:23PM +0200, Florian Hubold wrote:

> Well, the python modules from the gnumed-common package all go to
> /usr/lib/python2.5/site-packages/Gnumed, so they are available without  
> setting PYTHONPATH.
Or rather, courtesy of the default path.

> But the gnumed-server files currently all go in  
> /usr/lib/gnumed-server/server.
No problem.

> The symlink is also created during package install, it's named
> /usr/lib/GNUmed-server/Gnumed.
Strange. If at all the symlink should be

/usr/lib/gnumed-server/Gnumed -> /usr/lib/gnumed-server/server

But actually, assuming the proper version of the Python
modules are in /usr/lib/python2.5/site-packages/Gnumed/, no
such symlink should be needed at all.

You can verify proper system-wide installation of
gnumed-common by opening a console, typing "python" to start
an interactive session and typing

        "from Gnumed.pycommon import gmTools"

If that works the modules see properly installed.

> So either PYTHONPATH should
> be set to /usr/lib/GNUmed-server/Gnumed or /usr/lib/gnumed-server/server

*IF* you want to make the bootstrapper use local modules,
then, yes, prepend "/usr/lib/gnumed-server/" to PYTHONPATH
(note the missing "server" directory).

> But even when no symlink and not PYTHONPATH is set,
> why does the bootstrapping script fail in doing this correctly?

It does try to set things up:

snip
        cd ../../
        ln -vsn client Gnumed
        cd -
        export PYTHONPATH="../../:${PYTHONPATH}"
snip

which will only work if the scripts are invoked locally from
server/bootstrap/:

        cd server/bootstrap/
        ./boostrap-latest.sh

If that doesn't work something is rather odd.

> Another related question: Does PYTHONPATH take subdirectories into account,
> or must it point directly to the directory with the modules.

It must point to the directory which *contains* the top
level package name == directory, IOW "Gnumed".

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]