[moin-user] xapian on moinmoin

mor fall fall.mor at outlook.com
Sun Jul 29 09:31:28 EDT 2018


hello Paul
Have you an example on how to insert PYTHON_LIB on moin command.
I have never learnt python, i try to check on the internet but i didn't understand how to insert PYTHON_LIB

thanks
________________________________
De : Paul Boddie <paul at boddie.org.uk>
Envoyé : vendredi 27 juillet 2018 21:47
À : moin-user at python.org
Cc : mor fall
Objet : Re: [moin-user] xapian on moinmoin

On Friday 27. July 2018 14.40.48 mor fall wrote:
> Hello evrybody
>
> I m trying to configure xapian on my wiki but whenever i  execute the the
> command to build an index i got this error. If someone have a solution to
> resolve it.
>
> regards,
>
> sudo /srv/moin-private/python-env/bin/moin
> --config-dir=/srv/moin-private/wiki --wiki-url=localhost/ index build
> --mode=add 2018-07-26 18:13:52,230 INFO MoinMoin.log:151 using logging
> configuration read from built-in fallback in MoinMoin.log module
> 2018-07-26 18:13:52,232 INFO MoinMoin.log:157 Running MoinMoin 1.9.9
> release code from /srv/moin-private/moin-1.9.9/MoinMoin 2018-07-26
> 18:13:53,631 ERROR MoinMoin.config.multiconfig:366 xapian_search was
> auto-disabled because python-xapian is not installed [No module named
> xapian]. 2018-07-26 18:13:53,713 INFO MoinMoin.config.multiconfig:127
> using wiki config: /srv/moin-private/wiki/wikiconfig.pyc

This indicates that the moin script cannot load the xapian package, which is
provided by the xapian-bindings code. You can either try and configure the
environment using PYTHONPATH or just change the moin script to specify the
location of the xapian package. It is probably easier to do the second of
these things.

So, in /srv/moin-private/python-env/bin/moin you can follow the advice and
edit the code as follows:

#Fix and uncomment those 2 lines if your moin command doesn't find...
import sys
sys.path.insert(0, '/srv/moin-private/python-env/lib/python2.7/site-packages')

Here, I made a guess at where you have installed the xapian package, but you
will have specified this using PYTHON_LIB when configuring the xapian-bindings
code. For the above guess, you would have needed to have given PYTHON_LIB
as...

/srv/moin-private/python-env/lib/python2.7

So, in the moin script you would add whatever PYTHON_LIB was with an extra
"site-packages" component at the end.

I hope this helps.

Paul

P.S. It might be best to run sudo using the -u option to specify the user.
Otherwise, apart from the risks with running as root, the index files will end
up with root ownership (most likely) and won't be readable by the wiki.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20180729/0d675fe9/attachment.html>


More information about the moin-user mailing list