DRYな備忘録

Don't Repeat Yourself.

【AWS】eb cliのインストールまでメモ

pyenv

% cd
% git clone git://github.com/yyuu/pyenv.git .pyenv

~/.zshrcに以下を追加

# python
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
    export PATH=${PYENV_ROOT}/bin:$PATH
    eval "$(pyenv init -)"
fi

vertualenv

% cd $PYENV_ROOT/plugins
% git clone git://github.com/yyuu/pyenv-virtualenv.git

python2.7.8調達

ebが2系を求めてる

% xcode-select --install
% pyenv install 2.7.8
% pyenv global default
% pyenv rehash # これマジ大事
% pyenv versions
  system
  2.7.8
* default (set by /Users/otiai10/.pyenv/version)
% python --version
Python 2.7.8
% which pip
/Users/otiai10/.pyenv/shims/pip

eb cli

% pip search awsebcli
awsebcli                  - Command Line Interface for AWS EB.
% pip install awsebcli # もちろんここでsudoとかしようものならsystemに入りますよ
% which eb
/Users/otiai10/.pyenv/shims/eb
% eb --help

※ 2.6とeb initの挙動が違うようなので注意。configを変えたいだけならeb configを代わりに使う

DRY