vendredi 12 novembre 2010

SPMPT Tutorial : Trac plugins

Hi !
Today I will explain how to add some plugins to your trac.

Bases :
Trac is programmed with Python, so plugins are generally programmed with Python too.
SPMPT is shipped with easy_install which permit you to install easly Python softwares. So to install some plugins to Trac, most of them needs easy_install.

easy_install path is /Applications/MAMP/python/framework/Python.framework/Versions/2.6/bin/easy_install

Generally Trac's plugins give a documentation, how to install them, so read it with attention.
In this example we will install TracWysiwygPlugin.

1) Launch (/Applications/Utilities/

2) use easy_install to install the plugin like descripted in documentation, with SPMPT the path to easy_install is a little much long, don't forget to set the right Trac version (there 0.11) : /Applications/MAMP/python/framework/Python.framework/Versions/2.6/bin/easy_install

3) Processing

Doing subversion checkout from to /var/folders/lp/lp5TCmnQGCysjlEsUJnPy++++TM/-Tmp-/easy_install-slznk8/0.11

Processing 0.11

Running -q bdist_egg --dist-dir /var/folders/lp/lp5TCmnQGCysjlEsUJnPy++++TM/-Tmp-/easy_install-slznk8/0.11/egg-dist-tmp-eYEvnS

zip_safe flag not set; analyzing archive contents...

Adding TracWysiwyg to easy-install.pth file

Installed /Applications/MAMP/python/framework/Python.framework/Versions/2.6/lib/python2.6/site-packages/TracWysiwyg-

Processing dependencies for TracWysiwyg==

Finished processing dependencies for TracWysiwyg==

4) The plugin was downloaded, build and installed by easy_install in few seconds.
5) Now you need to enabled TracWysiwygPlugin in your trac project using trac.ini. trac.ini is located in : TRACDIRECTORY/conf/trac.ini

6) You have to referer to documentation

7) You need to add in section
tracwysiwyg.* = enabled

8) You need to refresh trac, now you have a better editor.

Most plugins works like this : easy_install to install, trac.ini to configure/enabled

Special thank to Kiruakiller


Aucun commentaire:

Enregistrer un commentaire