homebrew-core/Formula/pyenv.rb
Yamashita Yuu c366190a4b pyenv v0.4.0-20131217
Changes:

* python-build: Add new CPython releases; 3.3.3
* python-build: Add new CPython releases candidates; 3.4.0b1
* python-build: Add new PyPy releases; pypy-2.2.1, pypy-2.2.1-src
* python-build: Update default setuptools version (1.3.2 -> 2.0)
* python-build: Imported recent changes from ruby-build v20131211
* python-build: Fix broken build of CPython 3.3+ on Darwin
* python-build: Not build GNU Readline uselessly on Darwin
* pyenv: Fix pyenv-prefix to trim "/bin" in `pyenv prefix system`

Closes Homebrew/homebrew#25273.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-12-16 19:51:31 -08:00

37 lines
1.1 KiB
Ruby

require 'formula'
class Pyenv < Formula
homepage 'https://github.com/yyuu/pyenv'
url 'https://github.com/yyuu/pyenv/archive/v0.4.0-20131217.tar.gz'
sha1 '2d2a89bd89bce88a0e09b1473ef786bbdcb08394'
head 'https://github.com/yyuu/pyenv.git'
skip_clean "plugins", "versions"
def install
prefix.install "LICENSE", "README.md", "bin", "completions", "libexec"
prefix.install "plugins" => "default-plugins"
var_lib = "#{HOMEBREW_PREFIX}/var/lib/pyenv"
['plugins', 'versions'].each do |dir|
var_dir = "#{var_lib}/#{dir}"
mkdir_p var_dir
ln_sf var_dir, "#{prefix}/#{dir}"
end
ln_sf "#{prefix}/default-plugins/python-build", "#{var_lib}/plugins/python-build"
["pyenv-install", "pyenv-uninstall", "python-build"].each do |cmd|
bin.install_symlink "#{prefix}/default-plugins/python-build/bin/#{cmd}"
end
end
def caveats; <<-EOS.undent
To enable shims and autocompletion add to your profile:
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
To use Homebrew's directories rather than ~/.pyenv add to your profile:
export PYENV_ROOT=#{opt_prefix}
EOS
end
end