Skip to content

Commit

Permalink
Added pyenv formula
Browse files Browse the repository at this point in the history
Added formula to install pyenv, a tool for installing and managing
multiple python versions. Based on rbenv and ruby-build.
  • Loading branch information
OiNutter committed Jan 21, 2013
1 parent b53b383 commit c392fb2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Library/Formula/pyenv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require 'formula'

class Pyenv < Formula
homepage 'https://github.com/yyuu/pyenv'
url 'https://github.com/yyuu/pyenv/tarball/v0.1.2'
sha1 '6703b7044d64814bed6003074c0f8be8c11504d1'

head 'https://github.com/yyuu/pyenv.git'

def install
prefix.install Dir['*']

This comment has been minimized.

Copy link
@adamv

adamv Jan 21, 2013

Please provide a file listing; we don't like bulk-installing to prefix without knowing what subfolders and files exist.


var_lib = "#{HOMEBREW_PREFIX}/var/lib/pyenv"

This comment has been minimized.

Copy link
@adamv

adamv Jan 21, 2013

What's this for?

['plugins','versions'].each do |dir|
var_dir = "#{var_lib}/#{dir}"
mkdir_p var_dir
ln_sf var_dir, "#{prefix}/#{dir}"
end
end

def caveats; <<-EOS.undent
To enabled 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

0 comments on commit c392fb2

Please sign in to comment.