Hotwire 0.700についてとebuild
(2008/10/21)この記事は古い内容となっている。バージョン0.721向けのebuildは
http://cid-3f9be5b1cd4a806c.skydrive.live.com/browse.aspx/%E5%85%AC%E9%96%8B/Gentoo%20Linux%20ebuild/app-shells/hotwire
にアップロードしてある。
(2009/1/6)なお、Mandriva Linux 2009.0では標準のパッケージとして用意されている(バージョンは0.721)。
Hotwireのバージョン0.700が出ている。まだまだ激しく開発中という感じで、色々なところに変更が見られる。
- 独自のグラフィカルなシェル環境は「HotwirePipe」という名前が付いて、その他にPython/Perl/Rubyがシェル(対話型インタプリタ)上で使用できるようになっている。「Unix Shell」というモードも追加された。
- ヘルプなどから、オブジェクトの詳細のウィンドウが出るようになっている
- ユーザインターフェースも一部変更されている。
その他にも変更点がある。
Python 2.5のsqlite3モジュールと外部pysqlite2モジュール
Python 2.4系までの場合はpysqlite2を使用し、Python 2.5系の場合は内蔵の「sqlite3」モジュールを使用するようになっている。
[引用]ファイル名: hotwire-0.700/hotwire/state.py より
if sys.version_info[0] < 2 or sys.version_info[1] < 5: from pysqlite2 import dbapi2 as sqlite3 else: import sqlite3
Gentoo LinuxのPython 2.5系では「sqlite3」モジュールを外すことが可能だが、その場合、pysqlite2で代用することはできるはずなのに、上の書き方だと、返すバージョンからsqlite3を使用するように指定されてしまう。そこで、USE="-sqlite"なPython 2.5でpysqlite2を使用する場合は
ファイル名: hotwire-0.700-pysqlite2-with-python25.patch
--- hotwire-0.700/hotwire/state.py.orig +++ hotwire-0.700/hotwire/state.py @@ -20,10 +20,7 @@ # THE USE OR OTHER DEALINGS IN THE SOFTWARE. import os,sys,logging,time,datetime -if sys.version_info[0] < 2 or sys.version_info[1] < 5: - from pysqlite2 import dbapi2 as sqlite3 -else: - import sqlite3 +from pysqlite2 import dbapi2 as sqlite3 import gobject
のパッチを適用することにした。
更に、
File "/usr/lib64/python2.5/site-packages/hotwire_ui/scripts.py", line 167 results = ^ SyntaxError: invalid syntax
文法エラーになってしまう部分も修正。
ファイル名: hotwire-0.700-scripts-results.patch
--- hotwire-0.700/hotwire_ui/scripts.py.orig +++ hotwire-0.700/hotwire_ui/scripts.py @@ -164,7 +164,7 @@ def __do_search(self): text = self.__entry.get_property('text') - results = + results = [] model = gtk.ListStore(gobject.TYPE_PYOBJECT,) have_results = False for result in results:
ebuildは以下。使用する際には、filesサブディレクトリに上の2つのパッチファイルを配置してからダイジェストを取ってインストールする。
ファイル名: hotwire-0.700.ebuild
# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils gnome2-utils DESCRIPTION="An intelligent hybrid text/graphical shell for developers and system administrators" HOMEPAGE="http://code.google.com/p/hotwire-shell/" SRC_URI="http://hotwire-shell.googlecode.com/files/${P}.zip" LICENSE="GPL-2 MIT" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="pysqlite +sourceview" RDEPEND="dev-python/pygtk dev-python/dbus-python x11-libs/vte sourceview? ( || ( dev-python/pygtksourceview dev-python/gnome-python-desktop ) ) pysqlite? ( =dev-python/pysqlite-2* ) !pysqlite? ( >=dev-lang/python-2.5 )" DEPEND="dev-util/intltool" pkg_setup() { if use !pysqlite && ! built_with_use dev-lang/python sqlite; then eerror eerror "Hotwire requires Python 2.5 with sqlite3 support or pysqlite2" eerror die "Please re-merge >=dev-lang/python-2.5 with USE=sqlite or enable \"pysqlite\" USE flag" fi if ! built_with_use x11-libs/vte python; then eerror eerror "Hotwire requires VTE with Python support" eerror die "Please re-merge x11-libs/vte with USE=python" fi } src_unpack() { distutils_src_unpack distutils_python_version if use pysqlite && [[ ${PYVER_MINOR} -ge 5 ]]; then epatch "${FILESDIR}/${P}-pysqlite2-with-python25.patch" || die "epatch failed" fi epatch "${FILESDIR}/${P}-scripts-results.patch" || die "epatch failed" } src_install() { DOCS="COPYING COPYING.API COPYING.UI" distutils_src_install } pkg_postinst() { distutils_python_version python_mod_optimize \ "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/hotwire" \ "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/hotwire_ui" \ "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/hotapps" \ "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/hotvte" gnome2_icon_cache_update } pkg_postrm() { distutils_python_version python_mod_cleanup gnome2_icon_cache_update }
(2008/3/25)python_mod_optimize()の引数のディレクトリにhotappsとhotvteが含まれていなかったため修正、更に、「sourceview」USEフラグを既定で有効にした
今後は記事には貼り付けず、下のURLにアップロードする。
http://cid-3f9be5b1cd4a806c.skydrive.live.com/browse.aspx/%e5%85%ac%e9%96%8b/Gentoo%20Linux%20ebuild/app-shells/hotwire
関連URL: