homebrew-core/Formula/pyenv.rb
Yamashita Yuu 1a01f2bc3b pyenv 0.4.0-20140211
Changes:

* pyenv: Always append the directory at the top of the `$PATH` to return proper value for `sys.executable`
* pyenv: Unset `GREP_OPTIONS` to avoid issues of conflicting options
* python-build: Install `pip` with using `ensurepip` if available
* python-build: Add support for framework installation (`--enable-framework`) of CPython
* python-build: Import `bats` tests from ruby-build v20140110.1
* python-build: Add new CPython release candidates; 3.3.4, 3.4.0b3
* python-build: Add [Anaconda](https://store.continuum.io/cshop/anaconda/) and [Miniconda](http://repo.continuum.io/miniconda/) binary distributions
* python-build: Display error if the wget does not support Server Name Indication (SNI) to avoid SSL verification error when downloading from https://pypi.python.org.
* python-build: Update default setuptools version (2.1 -> 2.2)
* python-build: Update default pip version (1.5.1 -> 1.5.2)
* python-build: Import recent changes from ruby-build v20140204

Closes Homebrew/homebrew#26605.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-02-10 19:40:05 -08:00

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-20140211.tar.gz'
sha1 'f7c8a5baa9a6f857344935bec3f280a5fe1c6408'
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