TracTag(再)
なんか、あちこち眺めてみると、Pluginを使うにはegg形式でtracプロジェクトのplugin内に一度入れて、それをadmin-toolで有効にしないといけないようだ。site-packagesに入っていればよいというわけにはいかないらしい。
TracTagsは、こんどはtrunkから持って来る。
# svn co http://trac-hacks.org/svn/tagsplugin/trunk/ A trunk/setup.py A trunk/tractags A trunk/tractags/api.py A trunk/tractags/web_ui.py A trunk/tractags/htdocs A trunk/tractags/htdocs/css A trunk/tractags/htdocs/css/tractags.css A trunk/tractags/htdocs/js A trunk/tractags/htdocs/js/prototype.js A trunk/tractags/htdocs/js/util.js A trunk/tractags/htdocs/js/effects.js A trunk/tractags/htdocs/js/scriptaculous.js A trunk/tractags/htdocs/js/dragdrop.js A trunk/tractags/htdocs/js/slider.js A trunk/tractags/htdocs/js/controls.js A trunk/tractags/expr.py A trunk/tractags/__init__.py A trunk/tractags/test.py A trunk/tractags/ticket.py A trunk/tractags/wiki.py A trunk/tractags/macros.py A trunk/tractags/parseargs.py A trunk/tractags/templates A trunk/tractags/templates/tags.cs A trunk/tractags/templates/tagswiki.cs Checked out revision 1895. # mv trunk tractags1895 # cd tractags1895/ # apt-get install python-setuptools # python setup.py bdist_egg /usr/lib/python2.3/distutils/dist.py:227: UserWarning: Unknown distribution option: 'entry_points' warnings.warn(msg) usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'bdist_egg' (no module named 'distutils.command.bdist_egg')
eggにすることはできないようだ。
これは困ったな。
マニュアル導入するしかないってことね。
# wget wget http://peak.telecommunity.com/dist/ez_setup.py # python ./ez_setup.py You have an obsolete version of setuptools installed. Please remove it from your system entirely before rerunning this script. # apt-get remove --purge python-setuptools python2.3-setuptools # python ./ez_setup.py Downloading http://cheeseshop.python.org/packages/2.3/s/setuptools/setuptools-0.6c5-py2.3.egg Processing setuptools-0.6c5-py2.3.egg creating /usr/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg Extracting setuptools-0.6c5-py2.3.egg to /usr/lib/python2.3/site-packages Adding setuptools 0.6c5 to easy-install.pth file Installing easy_install script to /usr/bin Installing easy_install-2.3 script to /usr/bin Installed /usr/lib/python2.3/site-packages/setuptools-0.6c5-py2.3.egg Processing dependencies for setuptools==0.6c5
egg形式に変換。
# python setup.py bdist_egg running bdist_egg running egg_info creating TracTags.egg-info writing TracTags.egg-info/PKG-INFO writing top-level names to TracTags.egg-info/top_level.txt writing dependency_links to TracTags.egg-info/dependency_links.txt writing entry points to TracTags.egg-info/entry_points.txt writing manifest file 'TracTags.egg-info/SOURCES.txt' writing manifest file 'TracTags.egg-info/SOURCES.txt' installing library code to build/bdist.linux-i686/egg running install_lib running build_py creating build creating build/lib creating build/lib/tractags copying tractags/web_ui.py -> build/lib/tractags copying tractags/api.py -> build/lib/tractags copying tractags/__init__.py -> build/lib/tractags copying tractags/expr.py -> build/lib/tractags copying tractags/ticket.py -> build/lib/tractags copying tractags/test.py -> build/lib/tractags copying tractags/macros.py -> build/lib/tractags copying tractags/wiki.py -> build/lib/tractags copying tractags/parseargs.py -> build/lib/tractags creating build/lib/tractags/templates copying tractags/templates/tagswiki.cs -> build/lib/tractags/templates copying tractags/templates/tags.cs -> build/lib/tractags/templates creating build/lib/tractags/htdocs creating build/lib/tractags/htdocs/js copying tractags/htdocs/js/scriptaculous.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/prototype.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/util.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/effects.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/dragdrop.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/slider.js -> build/lib/tractags/htdocs/js copying tractags/htdocs/js/controls.js -> build/lib/tractags/htdocs/js creating build/lib/tractags/htdocs/css copying tractags/htdocs/css/tractags.css -> build/lib/tractags/htdocs/css creating build/bdist.linux-i686 creating build/bdist.linux-i686/egg creating build/bdist.linux-i686/egg/tractags copying build/lib/tractags/web_ui.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/api.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/__init__.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/expr.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/ticket.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/test.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/macros.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/wiki.py -> build/bdist.linux-i686/egg/tractags copying build/lib/tractags/parseargs.py -> build/bdist.linux-i686/egg/tractags creating build/bdist.linux-i686/egg/tractags/templates copying build/lib/tractags/templates/tagswiki.cs -> build/bdist.linux-i686/egg/tractags/templates copying build/lib/tractags/templates/tags.cs -> build/bdist.linux-i686/egg/tractags/templates creating build/bdist.linux-i686/egg/tractags/htdocs creating build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/scriptaculous.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/prototype.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/util.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/effects.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/dragdrop.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/slider.js -> build/bdist.linux-i686/egg/tractags/htdocs/js copying build/lib/tractags/htdocs/js/controls.js -> build/bdist.linux-i686/egg/tractags/htdocs/js creating build/bdist.linux-i686/egg/tractags/htdocs/css copying build/lib/tractags/htdocs/css/tractags.css -> build/bdist.linux-i686/egg/tractags/htdocs/css byte-compiling build/bdist.linux-i686/egg/tractags/web_ui.py to web_ui.pyc byte-compiling build/bdist.linux-i686/egg/tractags/api.py to api.pyc byte-compiling build/bdist.linux-i686/egg/tractags/__init__.py to __init__.pyc byte-compiling build/bdist.linux-i686/egg/tractags/expr.py to expr.pyc byte-compiling build/bdist.linux-i686/egg/tractags/ticket.py to ticket.pyc byte-compiling build/bdist.linux-i686/egg/tractags/test.py to test.pyc byte-compiling build/bdist.linux-i686/egg/tractags/macros.py to macros.pyc byte-compiling build/bdist.linux-i686/egg/tractags/wiki.py to wiki.pyc byte-compiling build/bdist.linux-i686/egg/tractags/parseargs.py to parseargs.pyc creating build/bdist.linux-i686/egg/EGG-INFO copying TracTags.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO copying TracTags.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TracTags.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TracTags.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TracTags.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/TracTags-0.4-py2.3.egg' and adding 'build/bdist.linux-i686/egg' to it removing 'build/bdist.linux-i686/egg' (and everything under it)
./dist/TracTags-0.4-py2.3.eggができている。
# cp ./dist/TracTags-0.4-py2.3.egg /var/trac/test/plugins/ # chown www-data:www-data /var/trac/test/plugins/TracTags-0.4-py2.3.egg
trac.iniも編集しておく。
# vi /var/trac/test/conf/trac.ini [trac] default_charset = UTF-8 default_handler = TagsWikiModule [components] trac.wiki.web_ui.wikimodule = disabled tractags.* = enabled [tags] index = cloud index.args = smallest=10, biggest=40, mincount=2, showcount=false listing.args = showheadings=true tagcloud.args = mincount=2, showcount=false [tags.ticket] fields=component,severity,keywords