class Xdot < Formula desc "Interactive viewer for graphs written in Graphviz's dot language" homepage "https://github.com/jrfonseca/xdot.py" url "https://files.pythonhosted.org/packages/75/d3/89151e5c24f59ac5577368651f9d2a5db3cdd870e8f96896e505cb876187/xdot-0.9.tar.gz" sha256 "a33701664ecfefe7c7313a120a587e87334f3a566409bc451538fcde5edd6907" revision 3 head "https://github.com/jrfonseca/xdot.py.git" bottle do cellar :any_skip_relocation sha256 "1560cba7af323eff64cf012d50d64f9c55548337a0867549b2361693ef9e21cf" => :mojave sha256 "5650061231c76ff5d4d36da3eef76224bbb9a9bcf7b4a4b6037364782fa99ba4" => :high_sierra sha256 "271c4ec69d982e73f0a9594dead0e8428076c1ecd84e8787ec687ba6981455f7" => :sierra sha256 "5650061231c76ff5d4d36da3eef76224bbb9a9bcf7b4a4b6037364782fa99ba4" => :el_capitan end depends_on "gtk+3" depends_on "py3cairo" depends_on "pygobject3" depends_on "python" resource "graphviz" do url "https://files.pythonhosted.org/packages/fa/d1/63b62dee9e55368f60b5ea445e6afb361bb47e692fc27553f3672e16efb8/graphviz-0.8.2.zip" sha256 "606741c028acc54b1a065b33045f8c89ee0927ea77273ec409ac988f2c3d1091" end def install xy = Language::Python.major_minor_version "python3" ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" resource("graphviz").stage do system "python3", *Language::Python.setup_install_args(libexec/"vendor") end ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" 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 system "#{bin}/xdot", "--help" end end