ふにゃるんv2

もとは、http://d.hatena.ne.jp/Wacky/

PEAKっていう、CPANもどきなインストーラで、インストール作業を楽にしよう

…そもそもは、pygraphvizっていうソフトが紹介されていたので、ちょっくら試してみようかな?と思ったら、PEAKを使えとか何か、そんな風な英文が読めたので、入れてみようか?と思った訳。
後、某掲示板で、EGGって拡張子が〜って話題になってたのもあるし。


PEAKってサイトは、↓ここ。


最初、どこに download があるのか探してしまったが、実のところ、「Installing "Easy Install"」の「Download ez_setup.py, and run it;」の ez_setup.py をダウンロードして実行すりゃいいだけだった。

$ python ez_setup.py
Downloading http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.
6a8-py2.4.egg
Processing setuptools-0.6a8-py2.4.egg
creating /usr/lib/python2.4/site-packages/setuptools-0.6a8-py2.4.egg
Extracting setuptools-0.6a8-py2.4.egg to /usr/lib/python2.4/site-packages
Adding setuptools 0.6a8 to easy-install.pth file
Installing easy_install script to /usr/bin

Installed /usr/lib/python2.4/site-packages/setuptools-0.6a8-py2.4.egg
Processing dependencies for setuptools==0.6a8
Setuptools version 0.6a8 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)

とまぁ、こんな風に適当なファイル(egg形式…某掲示板の話だと、中身はzip)をダウンロードして、セットアップしてくれる。


という訳で、ちょっくらインストールしてみよう。

G:\User\test>d:\APython24\Scripts\easy_install.exe SQLobject
Searching for SQLobject
Reading http://www.python.org/pypi/SQLobject/
Couldn't find index page for 'SQLobject' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://www.python.org/pypi/
Reading http://www.python.org/pypi/SQLObject/0.7.0
Reading http://sqlobject.org
Best match: SQLObject 0.7.0
Downloading http://cheeseshop.python.org/packages/2.4/S/SQLObject/SQLObject-0.7.
0-py2.4.egg#md5=71830b26083afc6ea7c53b99478e1b6a
Processing SQLObject-0.7.0-py2.4.egg
creating d:\apython24\lib\site-packages\SQLObject-0.7.0-py2.4.egg
Extracting SQLObject-0.7.0-py2.4.egg to d:\apython24\lib\site-packages
Adding SQLObject 0.7.0 to easy-install.pth file
Installing sqlobject-admin script to D:\APython24\Scripts

Installed d:\apython24\lib\site-packages\sqlobject-0.7.0-py2.4.egg
Processing dependencies for SQLobject
Searching for FormEncode>=0.2.2
Reading http://www.python.org/pypi/FormEncode/
Reading http://formencode.org
Reading http://www.python.org/pypi/FormEncode/0.4
Best match: FormEncode 0.4
Downloading http://cheeseshop.python.org/packages/2.4/F/FormEncode/FormEncode-0.
4-py2.4.egg#md5=17eca8592d2005236b79594a9b69d236
Processing FormEncode-0.4-py2.4.egg
creating d:\apython24\lib\site-packages\FormEncode-0.4-py2.4.egg
Extracting FormEncode-0.4-py2.4.egg to d:\apython24\lib\site-packages
Adding FormEncode 0.4 to easy-install.pth file

Installed d:\apython24\lib\site-packages\formencode-0.4-py2.4.egg


入ったかな?

G:\User\test>python
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlobject
>>> dir(sqlobject)
['AND', 'BLOBCol', 'BoolCol', 'CONTAINSSTRING', 'Col', 'CurrencyCol', 'DATETIME_
IMPLEMENTATION', 'DESC', 'DatabaseIndex', 'DateCol', 'DateTimeCol', 'DecimalCol'
, 'DefaultStyle', 'EnumCol', 'FirebirdConnection', 'FloatCol', 'ForeignKey', 'IN
', 'IntCol', 'KeyCol', 'LIKE', 'MaxdbConnection', 'MixedCaseStyle', 'MixedCaseUn
derscoreStyle', 'MultipleJoin', 'MySQLConnection', 'NOT', 'NoDefault', 'OR', 'Pi
ckleCol', 'PostgresConnection', 'RelatedJoin', 'SOBLOBCol', 'SOBoolCol', 'SOCol'
, 'SOCurrencyCol', 'SODateCol', 'SODateTimeCol', 'SODecimalCol', 'SOEnumCol', 'S
OFloatCol', 'SOForeignKey', 'SOIntCol', 'SOKeyCol', 'SOPickleCol', 'SOStringCol'
, 'SOStringLikeCol', 'SOUnicodeCol', 'SQLMultipleJoin', 'SQLObject', 'SQLObjectN
otFound', 'SQLRelatedJoin', 'SQLiteConnection', 'SingleJoin', 'StringCol', 'Styl
e', 'SybaseConnection', 'UnicodeCol', '__builtins__', '__doc__', '__file__', '__
name__', '__path__', '_firebird', '_maxdb', '_mysql', '_postgres', '_sqlite', '_
sybase', '_warn', 'cache', 'classregistry', 'col', 'connectionForURI', 'const',
'constraints', 'converters', 'datetime_available', 'dbconnection', 'declarative'
, 'default_datetime_implementation', 'firebird', 'func', 'getID', 'getObject', '
index', 'joins', 'main', 'maxdb', 'mxdatetime_available', 'mysql', 'postgres', '
setDeprecationLevel', 'sqlbuilder', 'sqlhub', 'sqlite', 'sqlmeta', 'sresults', '
styles', 'sybase', 'util']

おぉ、入ったよ、ママン!

注意点

注意点を一つ。
Cygwinだと(多分、Linuxも同じだろう)、セットアップすると、 easy_install ってスクリプトが /bin フォルダに入るので、直ぐ呼び出せるんだが、Windows環境だと直に呼べない。
Scriptsフォルダに実行ファイルが入っているので、これを呼び出す必要がある点に注意する事。