homebrew-core/Formula/pyenv.rb
2017-02-06 10:33:48 +01:00

27 lines
848 B
Ruby

class Pyenv < Formula
desc "Python version management"
homepage "https://github.com/yyuu/pyenv"
url "https://github.com/yyuu/pyenv/archive/v1.0.7.tar.gz"
sha256 "ea113e3b2437c2725c12c33517f412be6b83bbfcf0f40c665e099f4ea7986176"
version_scheme 1
head "https://github.com/yyuu/pyenv.git"
bottle :unneeded
depends_on "autoconf" => [:recommended, :run]
depends_on "pkg-config" => [:recommended, :run]
depends_on "openssl" => :recommended
depends_on "readline" => [:recommended, :run]
def install
inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX
prefix.install Dir["*"]
%w[pyenv-install pyenv-uninstall python-build].each do |cmd|
bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}"
end
end
test do
shell_output("eval \"$(#{bin}/pyenv init -)\" && pyenv versions")
end
end