Hi Andreas,

Andreas Tille wrote:
> Hi,
> 
> I tried to implement the Python policy [1] using python-support to
> the new GNUmed packages but failed.  If I try the basic essence
> of the /usr/bin/gnumed script I get:
> 
> $ python -m Gnumed.wxpython.gnumed
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/runpy.py", line 85, in run_module
>     loader = get_loader(mod_name)
>   File "/usr/lib/python2.5/pkgutil.py", line 456, in get_loader
>     return find_loader(fullname)
>   File "/usr/lib/python2.5/pkgutil.py", line 466, in find_loader
>     for importer in iter_importers(fullname):
>   File "/usr/lib/python2.5/pkgutil.py", line 422, in iter_importers
>     __import__(pkg)
> ImportError: No module named Gnumed.wxpython

From a quick look, this is the culprit:

--- gnumed-client-0.3.12/debian/gnumed-client.install   2009-03-28
14:01:04.000000000 +0100
+++ ./debian/gnumed-client.install      2009-03-28 13:38:46.000000000 +0100
@@ -1,10 +1,10 @@
-client/business
usr/share/python-support/gnumed-client/Gnumed
-client/*porters
usr/share/python-support/gnumed-client/Gnumed
-client/wxpython
usr/share/python-support/gnumed-client/Gnumed
-client/wxGladeWidgets
usr/share/python-support/gnumed-client/Gnumed
+client/business                             usr/share/Gnumed
+client/*porters                             usr/share/Gnumed
+client/wxpython                             usr/share/Gnumed
+client/wxGladeWidgets                       usr/share/Gnumed


That is, you're now shipping some modules in a private location (usr/share is
not in PYTHONPATH), so they are not found when you try to import them.

You could ship Gnumed in /usr/share/gnumed/Gnumed and append /usr/share/gnumed
to PYTHONPATH in /usr/bin/gnumed (that seems to work fine here, but I got an
error that mx.DateTime can't be imported, so you probably need to depend on
python-egenix-mxdatetime).

Cheers,
Emilio

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to