PageRenderTime 19ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/shabti/templates/moinmoin/data/moin/underlay/pages/HelpOnUpdatingPython/revisions/00000001

https://bitbucket.org/gawel/shabti
#! | 28 lines | 19 code | 9 blank | 0 comment | 0 complexity | ce4a44836cab43cc547bc89649040f87 MD5 | raw file
 1## Please edit system and help pages ONLY in the master wiki!
 2## For more information, please see MoinMoin:MoinDev/Translation.
 3##master-page:Unknown-Page
 4##master-date:Unknown-Date
 5#acl -All:write Default
 6#format wiki
 7#language en
 8== Updating Python ==
 9
10If you want to change the Python running your MoinMoin installation there are some issues to keep in mind:
11
12=== Location of the MoinMoin directory ===
13
14The default installation process (`setup.py`) installed the MoinMoin files into the site-packages directory of the current Python installation (for example `/usr/lib/python2.4/site-packages`). If you move to another Python interpreter you must reinstall the MoinMoin files into the new `lib/pythonX.X/site-packages` directory. If you installed the MoinMoin files elsewhere and adjusted `sys.path` this is not a problem.
15
16=== The precompiled Python files (.pyc) ===
17
18Python does not grant that .pyc files are compatible between Python versions. If you change the Python interpreter you should recompile the Python scripts. You may use 
19
20{{{
21python -c "import compileall; compileall.compile_dir('/path/to/MoinMoin')"
22}}}
23
24for this. If you reinstall MoinMoin for the new interpreter the step is not needed/done by setup.py.
25
26=== Empty Page Cache ===
27
28The page cache uses Python byte code for faster page rendering. To avoid compatibility problems you should empty the cache by hand by deleting all files in `data/pages/*/cache/` and `underlay/pages/*/cache/`.