brew install sphinx したら思ったのと違うsphinx がインストールされたでござるの巻

ドキュメント作成ツールのsphinxをOSXにインストールしようとしたんですね。

Sphinx-users.jpによると、portsかeazy_installを使ってインストールしてくださいとのこと。

そこはhomebrewかpypiでいれたい*1というのが人情。まず、homebrewで入れてみた。

$ brew search sphinx
cmu-pocketsphinx  cmu-sphinxbase    sphinx

$ brew install sphinx
...
==> ./configure --prefix=/usr/local/Cellar/sphinx/2.0.4 --localstatedir=/usr/local/var --with-libstemmer --with-pgsql --without-mysql
==> make install
==> Caveats
Sphinx has been compiled with libstemmer support.

Sphinx depends on either MySQL or PostreSQL as a datasource.

You can install these with Homebrew with:
  brew install mysql
    For MySQL server.

  brew install mysql-connector-c
    For MySQL client libraries only.

え、mysqlかpostgresがいるのと半信半疑でpostgresをインストール

$ brew search postgres
postgresql

$ brew install postgresql

プロジェクトを作る — Python製ドキュメンテーションビルダー、Sphinxの日本ユーザ会 を参考にsphinx-quickstartでプロジェクト作ってためしてみるかと思ったら、そんなコマンド無いですと。むむむ。

$ which sphinx-quickstart
sphinx-quickstart not found

$ ls /usr/local/Cellar/sphinx/2.0.4/bin 
indexer   indextool search    searchd   spelldump

確かにない。しかもなんか雰囲気が違う。

indexerやsearchdのmanページ見てたら、どうやらbrew install sphinx でインストールされたのはSphinx | Open Source Search Enginesphinxsearch っぽい。

紛らわしいすな。アンインストールしてやった。

$ brew uninstall sphinx
$ brew uninstall postgres

つぎは、pypiを試す。

*1:portsはアンインストールしてるため。それに、パッケージ管理したいし。