pip って何(・ω・ )

http://d.hatena.ne.jp/mopemope/20090220/p4
で、pip って何!?

pip

http://pip.openplans.org/

pip is a replacement for easy_install. It uses mostly the same techniques for finding packages, so packages that were made easy_installable should be pip-installable as well.

easy_install っていうか package の管理をもっと便利にするぜっていう認識でOK?

とりあえずインストール

$ sudo easy_install pip

自分の環境にインストールしてる package の一覧取得

$ pip freeze

で出来る


http://d.hatena.ne.jp/tokuhirom/20090219/1235034086


こういう事を Python でやりたいので
最近、環境をまっさらにした Ubuntu
とりあえず雛形的な物を作る

$ pip freeze
Beaker==0.9.5
Brlapi==0.5.2
Conch==8.1.0
GnuPGInterface==0.3.2
Numeric==24.2
PAM==0.4.2
PIL==1.1.6
PyYAML==3.06
SQLAlchemy==0.4.6
Twisted==8.1.0
Twisted-Core==8.1.0
Twisted-Lore==8.1.0
Twisted-Mail==8.1.0
Twisted-Names==8.1.0
Twisted-News==8.1.0
Twisted-Runner==8.0.0
Twisted-Web==8.1.0
Twisted-Words==8.1.0
apturl==0.2.7ubuntu1
ccsm==0.7.8
command-not-found==0.1
cups==1.0
docutils==0.4
gdata.py==1.0.9
gnome-app-install==0.5.12-0ubuntu1
human-theme==0.5
ipython==0.8.4
jockey==0.5beta3
mercurial==1.0.1
nvidia-common==0.0.0
onboard==0.0.0
pexpect==2.1
pit==0.2
pyOpenSSL==0.7
pycrypto==2.0.1
pyserial==2.3
python-apt==0.6.17
python-debian==0.1.11
python-irclib==0.4.6
python-launchpad-bugs==0.3.1
python-twitter==0.5
pyusb==0.4.1
pyxdg==0.15
rdflib==2.4.0
roman==0.2-
screen-resolution-extra==0.0.0
simple-ccsm==0.7.8
simplejson==2.0.6
system-service==0.1.6
ubuntu-gdm-themes==0.30
ubuntu-wallpapers==0.28.1
ufw==0.23.3
unattended-upgrades==0.1
usb-creator==0.1.8
virtkey==0.01
wsgiref==0.1.2
xkit==0.0.0
zope.interface==3.3.1

けっこう色々な物入ってるなぁ

pip freeze > mypackages.txt

して、自分が使ってそうなのだけ残す

$ cat mypackages.txt
PyYAML==3.06
SQLAlchemy==0.4.6
ipython==0.8.4
pit==0.2
python-irclib==0.4.6
python-twitter==0.5
simplejson==2.0.6

自分用の bundle 作成

$ pip bundle -r mypackages.txt yoshioris.pybundle

完成!!

これで完成した「yoshioris.pybundle」を持っていけばスグに環境が作れる!!

TODO mypackages.txt yoshioris.pybundle を バージョン管理

これ自体をどんな名前で管理しよう??
とか思いつつ mercurial 使ってみようかなぁ
誰か良い名前教えてくだしあ><
(Task::BeLike::Tokuhirom みたいなの)