作業メモ:Kanon(Trac)にプラグインをインストールする

Kanonは基本的なプラグインはパッケージ内部に存在する為、
実際の所、Kanon環境構築後に直ぐ様必要になるプラグインはない。

一部、今日はチケットを切る際に画像等が添付出来ると嬉しいよね。という思いから、下記プラグインをインストールしてみました。
trac drag drop plugin
TracDragDropPlugin – Trac Hacks - Plugins Macros etc.

しかし、KanonのページヘッダにあるHelp/GuideのTrac拡張機能のページを参照したのだけれども、
何やら色々なやり方が記載されていて、且つ、日本語が微妙に読み難い。

行間を読むのは失敗した時のリスクが高いので、少々情報を探ってみた。
まずは、プラグインをインストールする為には、何が必要なのかをピックアップ。
すると、以下2つの準備が必要である事が判明した。
1.ez_setup.py
2.easy_install

<やってみる>
何が起こるか不明な為、Kanon直下のディレクトリにて下記コマンドを実行し、ez_setup.pyをダウンロードする。
$ wget http://peak.telecommunity.com/dist/ez_setup.py

ダウンロードは問題なく完了し、次にダウンロードしたez_setup.pyを実行する。
$ python ez_setup.py

実行してみたが、どうやらエラーが発生してしまっている様子。
>Setuptools version 0.6c11 or greater has been installed.
>(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)

$ python ez_setup.py -U setuptools

<実行結果>
Searching for distribute
Reading http://pypi.python.org/simple/distribute/
Reading http://packages.python.org/distribute
Best match: distribute 0.6.32
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.32.tar.gz#md5=acb7a2da81e3612bfb1608abe4f0e568
Processing distribute-0.6.32.tar.gz
Running distribute-0.6.32/setup.py -q bdist_egg --dist-dir /tmp/easy_install-88Wxda/distribute-0.6.32/egg-dist-tmp-Fg68rx
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /usr/lib/python2.7/dist-packages
Non-egg installation
Moving elements out of the way...
Already patched.
/usr/lib/python2.7/dist-packages/setuptools.egg-info already patched.
After install bootstrap.
Creating /usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg-info
Creating /usr/local/lib/python2.7/dist-packages/setuptools.pth
Adding distribute 0.6.32 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/distribute-0.6.32-py2.7.egg
Processing dependencies for distribute
Finished processing dependencies for distribute

ここまで表示ログをみると、easy_installがインストールされている事が確認できた。

それでは、実際にプラグインをダウンロードしてみよう。
パッと判明した方法としては、プラグイン開発者様のSVNからチェックアウトする方法。

実際にやってみる。
$ easy_install http://trac-hacks.org/svn/tracdragdropplugin/0.12

うまくインストールが完了。

しかし、ブラウザでKanonにアクセスし、
チケットに添付ファイルをドラッグ・アンド・ドロップしても何も起こらない。

ブラウザのバージョンとしては動作するはずなのだが、原因は不明。

一先ずプラグインのインストール方法が解った為、今はそれで良しとしよう。