Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added pyenv formula #17229

Closed
wants to merge 1 commit into from

2 participants

@OiNutter

Added formula to install pyenv, a tool for installing and managing
multiple python versions. Based on rbenv and ruby-build.

@OiNutter OiNutter Added pyenv formula
Added formula to install pyenv, a tool for installing and managing
multiple python versions. Based on rbenv and ruby-build.
c392fb2
@OiNutter OiNutter referenced this pull request in yyuu/pyenv
Closed

pyenv install no longer works #3

@adamv

What's this for?

@adamv

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

@OiNutter

Apologies, closing as the @yyuu is submitting a pull request with this and a seperate formula for just python-build

@OiNutter OiNutter closed this
@yyuu yyuu referenced this pull request
Closed

Add pyenv formula #17250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 21, 2013
  1. @OiNutter

    Added pyenv formula

    OiNutter authored
    Added formula to install pyenv, a tool for installing and managing
    multiple python versions. Based on rbenv and ruby-build.
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 0 deletions.
  1. +29 −0 Library/Formula/pyenv.rb
View
29 Library/Formula/pyenv.rb
@@ -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['*']
+
+ 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
+ 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
Something went wrong with that request. Please try again.