/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. If you want to change the Python running your MoinMoin installation there are some issues to keep in mind:
  10. === Location of the MoinMoin directory ===
  11. The 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.
  12. === The precompiled Python files (.pyc) ===
  13. Python 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
  14. {{{
  15. python -c "import compileall; compileall.compile_dir('/path/to/MoinMoin')"
  16. }}}
  17. for this. If you reinstall MoinMoin for the new interpreter the step is not needed/done by setup.py.
  18. === Empty Page Cache ===
  19. The 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/`.