homebrew-core/Formula/xonsh.rb
2016-06-30 23:04:08 -07:00

39 lines
1.5 KiB
Ruby

class Xonsh < Formula
desc "Python-ish, BASHwards-compatible shell language and command prompt"
homepage "http://xon.sh"
url "https://github.com/xonsh/xonsh/archive/0.4.3.tar.gz"
sha256 "418b9e804217278f7fce659c97c657d984ba1d174c33df48060cccc49bd3a91e"
head "https://github.com/scopatz/xonsh.git"
bottle do
cellar :any_skip_relocation
sha256 "9c4503f24264ddc8aedc1044ababbb7526e847ec049e2fda8137601b3024d3a6" => :el_capitan
sha256 "5f205adde655a736623da71e824b742126b7172554b499c14176548d7bc27998" => :yosemite
sha256 "14e0161f5d8b7e62b0c87dc81c2b2b58f4a1ba37ecf662586a289c677778fb89" => :mavericks
end
depends_on :python3
resource "ply" do
url "https://pypi.python.org/packages/96/e0/430fcdb6b3ef1ae534d231397bee7e9304be14a47a267e82ebcb3323d0b5/ply-3.8.tar.gz"
sha256 "e7d1bdff026beb159c9942f7a17e102c375638d9478a7ecd4cc0c76afd8de0b8"
end
def install
version = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{version}/site-packages"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{version}/site-packages"
resource("ply").stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
system "python3", *Language::Python.setup_install_args(libexec)
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
assert_match "4", shell_output("#{bin}/xonsh -c 2+2")
end
end