195dba673d
Changes: * pyenv: Reliably detect parent shell in `pyenv init` (yyuu/pyenv#93) * pyenv: Import recent changes from rbenv 0.4.0 * pyenv: Import `bats` tests from rbenv 0.4.0 * python-build: Add new CPython releases candidates; 3.4.0b2 * python-build: Add ruby-build style patching feature (yyuu/pyenv#91) * python-build: Set `RPATH` if `--enable-shared` was given (yyuu/pyenv#65, yyuu/pyenv#66, yyuu/pyenv#82) * python-build: Update default setuptools version (2.0 -> 2.1) * python-build: Update default pip version (1.4.1 -> 1.5) * python-build: Activate friendly CPython during build if the one is not activated * python-build: Fix broken install.sh * python-build: Import recent changes from ruby-build v20131225.1 * python-build: Fix build error of CPython 2.x on the platform where the `gcc` is llvm-gcc. * version-ext-compat: Removed from default plugin. Please use [pyenv-version-ext](https://github.com/yyuu/pyenv-version-ext) instead. Closes Homebrew/homebrew#25783. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
39 lines
1.3 KiB
Ruby
39 lines
1.3 KiB
Ruby
require 'formula'
|
|
|
|
class Pyenv < Formula
|
|
homepage 'https://github.com/yyuu/pyenv'
|
|
url 'https://github.com/yyuu/pyenv/archive/v0.4.0-20140110.1.tar.gz'
|
|
sha1 '40204db80537741edbed87a6eefcbf823433ddc2'
|
|
|
|
head 'https://github.com/yyuu/pyenv.git'
|
|
|
|
depends_on 'autoconf' => [:recommended, :run]
|
|
depends_on 'pkg-config' => [:recommended, :run]
|
|
|
|
def install
|
|
inreplace 'libexec/pyenv', '/usr/local', HOMEBREW_PREFIX
|
|
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
|