HomebrewでtmuxやらSphinxを入れてみる

Sphinxやtmuxで遊んでみるためにHomebrewのインストール

正直MacPortsとHomebrewの違いってよくわかっていないのは秘密です^^;;

$ ruby -e “$(curl -fsSL https://raw.github.com/gist/323731)”

上記コマンドでHomebrewはインストール完了。
結果は下記の通り

==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/…
/usr/local/Library/Homebrew/…

Press enter to continue (Enterでインストール続行)
==> /usr/bin/sudo /bin/mkdir /usr/local
Password: (管理者のパスワード入力)
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local
==> Downloading and Installing Homebrew…
==> Installation successful!
Now type: brew help

楽ちんだねー

続いてtmuxのインストール

$ brew install tmux
==> Installing tmux dependency: libevent
==> Downloading http://downloads.sourceforge.net/project/levent/libevent/libeven
######################################################################## 100.0%
==> ./configure –prefix=/usr/local/Cellar/libevent/2.0.14
==> make install
/usr/local/Cellar/libevent/2.0.14: 48 files, 1.9M, built in 115 seconds
==> Installing tmux
==> Downloading http://sourceforge.net/projects/tmux/files/tmux/tmux-1.5/tmux-1.
######################################################################## 100.0%
==> ./configure –prefix=/usr/local/Cellar/tmux/1.5 –sysconfdir=/usr/local/etc
==> make install
==> Caveats
Bash completion script was installed to:
/usr/local/etc/bash_completion.d/tmux
==> Summary
/usr/local/Cellar/tmux/1.5: 4 files, 460K, built in 44 seconds

portsみたいな感じで自動でmakeしてInstallまでしてくれるんだ
Core 2 Duoのマシンだからあまり速くはないねーー

続いてはSphinx
参考サイト:Sphinx+blockdiagを3行でインストール
Homebrewでpipをインストールします。

$ brew install pip

Error: No available formula for pip
Install pip with easy_install:

easy_install pip

エラー出た(x_x)
easy_installを使えとのこと。
ということで「easy_install pip」を実行したらPermissionのエラーがでた(x_x)

$ sudo easy_install pip
Password:
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://www.pip-installer.org
Reading http://pip.openplans.org
Best match: pip 1.0.2
Downloading http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz#md5=47ec6ff3f6d962696fe08d4c8264ad49
Processing pip-1.0.2.tar.gz
Running pip-1.0.2/setup.py -q bdist_egg –dist-dir /tmp/easy_install-aTs1kZ/pip-1.0.2/egg-dist-tmp-CDZOi_
warning: no files found matching ‘*.html’ under directory ‘docs’
warning: no previously-included files matching ‘*.txt’ found under directory ‘docs/_build’
no previously-included directories found matching ‘docs/_build/_sources’
Adding pip 1.0.2 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip-2.7 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

続いてSphinx+blockdiag

$ sudo pip install -U sphinxcontrib-blockdiag
Downloading/unpacking sphinxcontrib-blockdiag
Downloading sphinxcontrib-blockdiag-1.0.0.tar.gz
Running setup.py egg_info for package sphinxcontrib-blockdiag
(略)

必要なモジュールは自動でinstallしてくれます。
ツールを入れるのも簡単。

blockdiagが動かない(x_x)下記エラーを出すなー
うーん。

Exception occurred:
  File "/Library/Python/2.7/site-packages/PIL/ImageFont.py", line 34, in __getattr__
    raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
The full traceback has been saved in /var/folders/w7/_2wjd76n3ws7pwlxp8bfd5lr0000gn/T/sphinx-err-uqYazw.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
make: *** [html] Error 1

対応は後から考えよう^^;;