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.
- Create a new project in Eclipse
Download MoinMoin and extract it into the project directory that you use in Eclipse.
- Select wikiserver.py in the package explorer and press Cmd-F11 (Debug).
- 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
- install Python
- configure a development environment
install Eclipse http://www.eclipse.org/
install PyDev http://pydev.sourceforge.net/
- define Python as interpreter
>>Window >>Prefernces >>PyDev >>Interpreter - Python
Windows
GNU/Linux (Ubuntu 7.10)
- create a new workspace
create a new project named MoinMoin
install MoinMoin, if it isn't
- check if it run
import the installed MoinMoin from \Python24\Lib\site-packages\MoinMoin into the new project
create a new workspace named Wiki
import the installed Instanze \Python24\share\moin into the Wiki-project
- coping:
/server/moin.py to moin
/config/wikiconfig.py to moin
configurate moin.py
configurate wikiconfig.py
check if it run, moin.py right-klick, >>Run As >>Python Run
- Now change the python-path:
- right-click on the project
>>Properties
>>PyDev - PYTHONPATH
- External Source Folders
>>Add source folder
- select the current workspace
Setup a Plugin-Project
- Now, I explain, how you can develop plugins, seperated from your Instanz
create a new workdir named like Plugin
- copy the plugin directory form your Wiki workdir in your new workdir
add the following line to your wikiconfig.py
1 plugin_dir = "DRIVE:/WORKSPACE/Plugin/plugin"
now, you can work and debug on some different plugins
for every new plugin, you can add the plugin_dir variable.for example:
Tools/Add-ons
Debugging
PyDev
For debugging, you can use the build-in debugger of PyDev
Version management system
With eclipse, you can decide different add-ons for different version systems:
Mercurial
Mercurial Eclipse http://www.vectrace.com/mercurialeclipse/
There are also more info in the trac system then the static website here you can follow the development and report bugs: http://home.zingo.org/trac/mercurialeclipse
Subversion
Moin development does not use Subversion.
Subclipse http://subclipse.tigris.org/
Subversive http://www.polarion.org/index.php?page=overview&project=subversive
Testing
Unit-Test
pyunit
Test automation
For Test-driven development you can use the Project Builder of Eclipse.
Setup a new builder:
- right-click on the project
>>Properties
>>Builders
click on New...
select Program
on the register Main you have to insert the following parameters:
Location
path/to/python/interpreter
Working Directory
${project_loc}
Arguments
${project_loc}/unittest/test_unittest.py
on the register Environment you have to add a new variable:
Variable
Value
PYTHONPATH
${project_loc}
on the register Build Options you can configure how the builder have to run.
Browser-Test
Selenium http://www.openqa.org/selenium/
Links
http://www-128.ibm.com/developerworks/opensource/library/os-ecant/
Comments
- nice work, thanks!
- somebody ask me about it
- maybe integrate checkout of the source with Mercurial into some workdir - currently (at work) I use SVN
- do not install moin to site-packages, but directly run it from the workdir
for simple debugging I move/copy MoinMoin in the Eclipse-Workspace
- for active development, rather use 1.6
- currently I work with 1.5.x but 1.6 I think work too
may be you should think on switching to 1.6 for development too. In some parts it is much easier e.g. the standalone server of DesktopEdition is integrated and you have only to run moin.py from the top level dir (it is already preconfigured). -- ReimarBauer 2007-03-28 07:33:41
- currently I work with 1.5.x but 1.6 I think work too