homebrew-core/Formula/pyenv.rb
Yamashita Yuu 88a85cd36c pyenv 0.4.0-20131023
Changes:

* pyenv: Improved [fish shell](http://fishshell.com/) support
* python-build: Add new PyPy releases; pypy-2.1, pypy-2.1-src,
* pypy3-2.1-beta1, pypy3-2.1-beta1-src
* python-build: Add ancient versions; 2.4, 2.4.1, 2.4.3, 2.4.4 and 2.4.5
* python-build: Add alpha releases; 3.4.0a2, 3.4.0a3, 3.4.0a4
* python-build: Update default pip version (1.4 -> 1.4.1)
* python-build: Update default setuptools version (0.9.7 -> 1.1.6)

Closes Homebrew/homebrew#23462.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-23 12:00:20 +01: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-20131023.tar.gz'
sha1 'c869a01e663e762a4ee116d12c1b36e3a3563c8f'
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