forked from Homebrew/legacy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added formula to install pyenv, a tool for installing and managing multiple python versions. Based on rbenv and ruby-build.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Sorry, something went wrong. |
||
|
||
var_lib = "#{HOMEBREW_PREFIX}/var/lib/pyenv" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
['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 |
Please provide a file listing; we don't like bulk-installing to prefix without knowing what subfolders and files exist.