Eclipse Development Environment

The original content of this page is outdated but is kept for reference further down this page.

OS
Mac OS X Leopard
Python
2.5.2
IDE

Eclipse Version 3.4.1 with PyDev 1.3.22

MoinMoin
1.8.0rc1

We assume Python, Eclipse and Pydev are all installed. See the pydev docs for installation instructions.

  1. Create a new project in Eclipse
  2. Download MoinMoin and extract it into the project directory that you use in Eclipse.

  3. Select wikiserver.py in the package explorer and press Cmd-F11 (Debug).
  4. Insert breakpoints anywhere in the moinmoin code or in the macro you wish to debug

That's it. Below is the original description that did not work for me.


OS
Windows XP, Ubuntu 7.10
Python
2.4, 2.5
IDE

Eclipse Version 3.2.2 with PyDev 1.2.5

MoinMoin
1.5.x, 1.6

Preparing

  1. install Python
  2. configure a development environment
    1. install Eclipse http://www.eclipse.org/

    2. install PyDev http://pydev.sourceforge.net/

    3. define Python as interpreter
      • >>Window >>Prefernces >>PyDev >>Interpreter - Python

        Windows

        GNU/Linux (Ubuntu 7.10)

        Preferences.png

        PreferencesUbuntu.png

  3. create a new workspace
  4. create a new project named MoinMoin

  5. install MoinMoin, if it isn't

  6. check if it run
  7. import the installed MoinMoin from \Python24\Lib\site-packages\MoinMoin into the new project

    MoinMoinImport.png

  8. create a new workspace named Wiki

  9. import the installed Instanze \Python24\share\moin into the Wiki-project

  10. coping:
    • /server/moin.py to moin

      /config/wikiconfig.py to moin

    ServerConfigCopy.png

  11. configurate moin.py

    • change:
      •    1 sys.path.insert( 0, '/path/to/wikiconfig' )
        
      to:
      •    1 sys.path.insert( 0, 'DRIVE:\WORKSPACE\Wiki' )
        

      Path to htdocs:

      •    1 docs = '/usr/share/moin/htdocs'
        
      change to:
      •    1 docs = 'DRIVE:\WORKSPACE\Wiki\htdocs'
        
      Maybe change the port:
      •    1 port = 8000
        
  12. configurate wikiconfig.py

    • change data_dir and data_underlay_dir to:

      •    1 data_dir = 'DRIVE:\WORKSPACE\Wiki\data'
        
      and
      •    1 data_underlay_dir = 'DRIVE:\WORKSPACE\Wiki\underlay'
        
  13. check if it run, moin.py right-klick, >>Run As >>Python Run

  14. Now change the python-path:
    • right-click on the project
    • >>Properties

    • >>PyDev - PYTHONPATH

    • External Source Folders
    • >>Add source folder

    • select the current workspace

    (!) If you want to develop/debug the MoinMoin-Engine in your workspace, rename or delete the installed MoinMoin-Engine in \Python24\Lib\site-packages\

Setup a Plugin-Project

Tools/Add-ons

Debugging

PyDev

Version management system

With eclipse, you can decide different add-ons for different version systems:

Mercurial

Subversion

/!\ Moin development does not use Subversion.

Testing

Unit-Test

pyunit

Test automation

For Test-driven development you can use the Project Builder of Eclipse.

Setup a new builder:

Browser-Test

http://www-128.ibm.com/developerworks/opensource/library/os-ecant/

Comments

MoinMoin: EclipseDevelopmentEnvironment (last edited 2008-10-09 12:34:31 by PeterGurk)