39 lines
1.5 KiB
Ruby
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.3.4.tar.gz"
|
|
sha256 "8c1f1612944baba310c93de84c71e8f7e7bd71b1115ef783d9800100fb29705e"
|
|
head "https://github.com/scopatz/xonsh.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "491d8538d19c217064175e3a0d5d711b27bf2505eec0f2b6027783fd49dcb22f" => :el_capitan
|
|
sha256 "12b61fe805f3992ceb8a1f912ede5b4f96cdda2015abae756cce661770ed0d68" => :yosemite
|
|
sha256 "eafa24390595c564fc8af8a19b41523f86f601743a295372f93efb64b07acb5a" => :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
|