bb3c734e52
Changes: * pyenv: Fix minor issue of variable scope in `pyenv versions` * python-build: Update base ruby-build version to v20130628 * python-build: Use brew managed OpenSSL and GNU Readline if they are available * python-build: Fix build of CPython 3.3+ on OS X * python-build: Fix build of native modules of CPython 2.5 on OS X * python-build: Fix build of CPython 2.6+ on openSUSE * python-build: Add ancient versions; 2.4.2 and 2.4.6. The build might be broken. * python-build: Update default pip version (1.3.1 -> 1.4) * python-build: Update default setuptools version (0.7.2 -> 0.9.7) Closes Homebrew/homebrew#21459. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
37 lines
1.1 KiB
Ruby
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-20130726.tar.gz'
|
|
sha1 'e56af71947e178b8f0281cfe6bf9a3f2070fb962'
|
|
|
|
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
|