moin
moin copied to clipboard
how to install moin2 from test.pypi
Every developer should install moin2 from github. For wiki admins who cannot, there is a packaging test on https://test.pypi.org/project/moin/
Moin on test.pypi gets updated as a test on an irregular basis. Cloning from github is a better choice.
<python> -m venv </path/to/new/virtual/environment>
cd </path/to/new/virtual/environment>
source bin/activate # scripts\activate on windows
pip install --upgrade pip # next command fails with pip 9.0.1 and maybe later versions
pip install --pre --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple moin
moin create-instance --path <path/to/new/wikiconfig/dir> # path optional, defaults to CWD
cd <path/to/new/wikiconfig/dir> # skip if using default CWD
moin --help # prove it works
moin index-create -s -i # creates empty wiki
-- or --
moin index-create -s -i # creates empty wiki
moin load-sample # data but no index
moin index-build # data with index
-- or --
moin import19 --data_dir <path-to-moin-1.9/wiki/data -s -i > import19.txt # review import19.txt for errors
moin index-build # data with index
moin run --port 8080 # default port is 8080, point browser to http://127.0.0.1:8080
P.S.
- you should have reviewed and updated wikiconfig.py
- default start is Home, not FrontPage
Can I add the command
pip install --pre --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple moin
to docs/admin/install.rst
in addition to some other smaller fixes? This can help new interested people.
Sure, I will update test.pypi in a few days. I have no auth to update moin on pypi.
Uploaded moin 2.0.0a11 to testpypi
I am trying to install moin2 from source code in folder ~/moin. Ubuntu 22.04, python3.10.6 $ ./m quickinstall Running quickinstall.py... output messages redirected to m-quickinstall.txt
Searching m-quickinstall.txt, important messages are shown below... Do "./m log quickinstall" to see complete log.
3 Preparing metadata (setup.py): finished with status 'error' 4 error: subprocess-exited-with-error 6 × python setup.py egg_info did not run successfully. 18 Traceback (most recent call last): 40 raise LookupError( 41 LookupError: setuptools-scm was unable to detect version for /home/rudi/moin. 48 note: This error originates from a subprocess, and is likely not a problem with pip. 49 error: metadata-generation-failed 51 × Encountered error while generating package metadata. 56 Traceback (most recent call last): 64 raise CalledProcessError(retcode, cmd) 65 subprocess.CalledProcessError: Command '['/home/rudi/moin-venv-python3/bin/pip', 'install', '--upgrade', '--editable', '/home/rudi/moin', '--upgrade-strategy=eager']' returned non-zero exit status 1. Quickinstall run time (h:mm:ss) 0:00:03
What I am doing wrong? I am trying to install moin2 from source code in folder ~/moin. Ubuntu 22.04, python3.10.6 $ ./m quickinstall Running quickinstall.py... output messages redirected to m-quickinstall.txt
Searching m-quickinstall.txt, important messages are shown below... Do "./m log quickinstall" to see complete log.
3 Preparing metadata (setup.py): finished with status 'error' 4 error: subprocess-exited-with-error 6 × python setup.py egg_info did not run successfully. 18 Traceback (most recent call last): 40 raise LookupError( 41 LookupError: setuptools-scm was unable to detect version for /home/rudi/moin. 48 note: This error originates from a subprocess, and is likely not a problem with pip. 49 error: metadata-generation-failed 51 × Encountered error while generating package metadata. 56 Traceback (most recent call last): 64 raise CalledProcessError(retcode, cmd) 65 subprocess.CalledProcessError: Command '['/home/rudi/moin-venv-python3/bin/pip', 'install', '--upgrade', '--editable', '/home/rudi/moin', '--upgrade-strategy=eager']' returned non-zero exit status 1. Quickinstall run time (h:mm:ss) 0:00:03
What I am doing wrong? Is there a HowTo to install moin2? Rudi
Please check this documentation, there are two sections Installation
and Installation (for developers)
:
https://moin-20.readthedocs.io/en/latest/admin/install.html
Thanks for trying moin2, Ulrich
Hello UlrichB22,
Thank you very much for your for your quick answer.
Yes. I have read https://moin-20.readthedocs.io/en/latest/admin/install.html carefully. e.g.: $ apt install moin2 # that does not work
$ pip install --pre --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple moin That worked, otherwise I coud not call: $ ./m quickinstall # in folder ~/moin/
So, for me it is still mysterious.
Greetings, Rudi
The command in output line 65 fails. Can you run it directly to get more details on the error?
/home/rudi/moin-venv-python3/bin/pip install --upgrade --editable /home/rudi/moin --upgrade-strategy=eager
/home/rudi/moin-venv-python3/bin/pip install --upgrade --editable /home/rudi/moin --upgrade-strategy=eager Obtaining file:///home/rudi/moin Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
/home/rudi/moin-venv-python3/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
/usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'message_extractors'
warnings.warn(msg)
Traceback (most recent call last):
File "
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
I checked on a fresh install on ubuntu 22.04 desktop. After installation from test.pypi I could use moin --help
and create an instance using moin command. There was no quickinstall.py, this is only for developers after installation from git. Please see also #907 .
Hello UlrichB22, Thank you very much for your extensive help. I have tried the command: $ cd ~/moin $ pip install --pre --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple moin There was a lot of checking, unfortunately the folder "moin" is still empty. :-(
Any further help please?
The moin software package goes somewhere into subdirectory .local in your home. I my case it is ~/.local/lib/python3.10/site-packages/moin/
. You don't need to care about that because it is for wiki users who don't want to change the code.
To have the moin command available you may need to expand your PATH environment with ~/.local/bin using
export PATH=$PATH:~/.local/bin
The empty ~/moin is ok. If you change directory to it and run the moin create-instance
command the wiki and its config will go there.
I run these commands to create a new wiki with English help pages and to start the builtin server:
moin create-instance
moin index-create -s -i
moin load-help -n en
moin load-help -n common
moin run
Hello UlrichB22, Thank you very much for your extensive help.
Now moin2 works, big smile. http://127.0.0.1:8080/Home
I think your help should find a place in the "moin" documentation :-)
Is it possible to import the v1.9 wiki data into moin2, as provided in quickinstall.py ?
Greetings, Rudi
https://moin-20.readthedocs.io/en/latest/admin/upgrade.html?highlight=import19#importing-your-moin-1-9-data
Hello Roger, Thank you very much for your help. The import of the moin-1.9.9 wiki worked. Unfortunately with a lot of errors, see: 96 -rw-rw-r-- 1 rudi rudi 96621 Okt 15 10:02 import19err.log 432 -rw-rw-r-- 1 rudi rudi 441011 Okt 15 10:03 import19out.log
I will attach 2 screenshots of a web page: from moin-1.9.9 and moin2 import
It looks to me, that there is a lot to do on the import filter. Regards, Rudi
Please open a new issue and include the raw 1.9 page content. Were there any error messages in the log?
The problem I see is the attachments did not get translated correctly (or not at all). Anything else?
Hello Roger, I found no "moin" command to clear the moin2 wiki database. Does the attached moin-1.9.9 data archive of the page "AVRArduinoProMini" could help you? Regards, Rudi
Hello Roger, I tried the followingg:
$ mkdir moin2 $ cd ~/moin2 $ moin create-instance
$ moin import19 -s -i --data_dir ~/moin-1.9.9/wiki/data 1>import19out.log 2>import19err.log $ moin run In Firefox: http://127.0.0.1:8080/
pack folder moin2.zip
I hope it helps. Regards, Rudi
There is no moin command to clear the moin2 wiki database. There is a todo to create the command somewhere.
For now, you must manually delete the /wiki/data/ and /wiki/index/ directories.
If you ran this command:
moin import19 -s -i --data_dir ~/moin-1.9.9/wiki/data 1>import19out.log 2>import19err.log
the output in import19err.log would be useful.
Create a new issue and post the error messages
The translated languages are not displayed if moin is installed from test.pypi.org.
The pypi package does not contain the compiled catalog files, e.g.
src/moin/translations/de/LC_MESSAGES/messages.mo
.
If moin is installed from git the catalog is compiled by quickinstall. IMO we should avoid the need to have compile_catalog
run by users and add the compiled files as package_data.
agree; adding include src/moin/translations/*/LC_MESSAGES/messages.mo
to MANIFEST.in` seems to fix it.
Will submit a pull request.
Nothing left to do here, Installing moin from test.pypi.org included in docs/admin/install.rst