DotCloud 環境作り

DotCloud にてPSGIがサポートされたということで、Solaris11上にその環境を作ってみました。
くわしくは

○pythonbrew で Python入れる

pythonbrew

普段からperlbrewを使っている人には言わずもがな。
OSに入っているものなんて使ってられないよ〜、ということで。
なお、今回はDotCloudのマニュアルにはver2.6の記述があるので2.6.6を使いました。


失敗した。


$ curl -kLO http://github.com/utahta/pythonbrew/raw/master/pythonbrew-install
$ chmod +x pythonbrew-install
$ ./pythonbrew-install
pythonbrew required Python (2.4, 2.5, 2.6 or 2.7).
$

Python自体はOSのが入っているんだけどな〜と、pythonbrew-installの中を見ながら、、、自分のSolaris11にgunのsedが入ってないのでコケテました。


$ pfexec pkg install text/gnu-sed
$ ./pythonbrew-install
...
Please add the following line to the end of your ~/.bashrc
$
$ vi .bashrc
source $HOME/.pythonbrew/etc/bashrc (追記)

再ログイン後にインストール、、、失敗した。


$ pythonbrew install 2.6.6
...
ERROR: Failed to install Python-2.6.6.
$ more ~/.pythonbrew/log/build.log
...
Failed to find the necessary bits to build these modules:
_bsddb bsddb185 gdbm
linuxaudiodev ossaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_curses _curses_panel sunaudiodev
$

まぁよく検索でひっかかどうでもよいモジュールにしか見えない。audioとかいらない。
( $ pkg install gdbm ぐらいはしたけど)

無視して強制インストール


$ pythonbrew install --force 2.6.6
...
Installed Python-2.6.6 successfully. Run the following command to switch to Python-2.6.6.
pythonbrew switch 2.6.6
$ pythonbrew switch 2.6.6
$ python --version
Python 2.6.6

○ DotCloud モジュールを入れる


$ easy_install dotcloud
$ dotcloud --version
DotCloud CLI version 0.3.1
$

これで環境作りは終わり。