Bug#597739: Salome: cannot load module salomeloader

Adam C Powell IV hazelsct at debian.org
Thu Sep 30 16:05:18 UTC 2010


On Thu, 2010-09-30 at 17:41 +0200, Alain Leufroy wrote:
> > Hi Adam,
> >
> > I've worked a little bit on this problem with André.
> >
> > We see that the problem is about the fact that the Salome python modules
> > site in the ``salome/`` directory whereas it is not interpreted as a
> > package by python (``salome/__init__.py`` is missing) and all python code
> > import these modules directly.
> > As a consequence the ``salome/`` directory must be added to the PYTHONPATH
> > (as done in runSalome).
> >
> > But when calling ``salomeloader`` the PYTHONPATH was not modified.
> > We found two kinds of solution.
> >
> > 1. Letting the install as clean as it is and expecting that advanced user
> > correctly set the PYTHONPATH:
> >
> >  ex:
> >
> >  $ PYTHONPATH=/usr/lib/python2.6/dist-packages/salome/ salomeloader
> 
> I've enclosed a solution without splitting salomeloader into 2 files 
> (bash+python) using the ``sys.path`` directly in the initial salomeloader.sh 
> (see attached patch).

Thank you Alain, that's a much more elegant solution than the one I had
implemented.  I just switched over to this solution (and credited you in
the changelog) in the alioth git repository.

-Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools
http://www.opennovation.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20100930/e7f66342/attachment-0001.pgp>


More information about the debian-science-maintainers mailing list