python のモジュール 『 Python Egg 』を使う。

setuptools を使うと Python Egg が使えるようになる。(要約しすぎ!!)
Python の distutils を拡張する。

setuptools 日本語訳

setuptools – The PEAK Developer’s Center

インストールは簡単!!


[root@localhost ~]# rpm -q python
python-2.4.3-21.el5
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# wget http://peak.telecommunity.com/dist/ez_setup.py
--15:42:17--  http://peak.telecommunity.com/dist/ez_setup.py
peak.telecommunity.com をDNSに問いあわせています... 209.190.5.234
peak.telecommunity.com|209.190.5.234|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 9716 (9.5K) [text/plain]
Saving to: `ez_setup.py'
100%[=======================================>] 9,716       27.9K/s   in 0.3s   
15:42:23 (27.9 KB/s) - `ez_setup.py' を保存しました [9716/9716]
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# python
python     python2    python2.4  
[root@localhost ~]# python ./ez_setup.py 
Downloading http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg
Processing setuptools-0.6c9-py2.4.egg
creating /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg
Extracting setuptools-0.6c9-py2.4.egg to /usr/lib/python2.4/site-packages
Adding setuptools 0.6c9 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.4 script to /usr/bin
Installed /usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg
Processing dependencies for setuptools==0.6c9
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#


egg モジュールをインストールするには。


egg モジュール作成。

# setup.py bdist_egg


egg モジュールインストール。

# easy_install *.egg

直ダウンロードにも対応しているらしい。
# easy_install URL


pylibacl をインストールしてみる。


[root@localhost ~]# tar zxvf pylibacl-0.4.0.tar.gz
[root@localhost pylibacl-0.4.0]# cd pylibacl-0.4.0
[root@localhost pylibacl-0.4.0]# ./setup.py bdist_egg
・・・・・・・・・・
・・・・・・・・・・
creating 'dist/pylibacl-0.4.0-py2.4-linux-i686.egg' and adding 'build/bdist.linux-i686/egg' to it
・・・・・・・・・・
[root@localhost pylibacl-0.4.0]#
[root@localhost pylibacl-0.4.0]# easy_install dist/pylibacl-0.4.0-py2.4-linux-i686.egg 
Processing pylibacl-0.4.0-py2.4-linux-i686.egg
Copying pylibacl-0.4.0-py2.4-linux-i686.egg to /usr/lib/python2.4/site-packages
Adding pylibacl 0.4.0 to easy-install.pth file
Installed /usr/lib/python2.4/site-packages/pylibacl-0.4.0-py2.4-linux-i686.egg
Processing dependencies for pylibacl==0.4.0
Finished processing dependencies for pylibacl==0.4.0
 


こんな感じ!!