class Doitlive < Formula desc "Replay stored shell commands for live presentations" homepage "https://doitlive.readthedocs.io/en/latest/" url "https://files.pythonhosted.org/packages/2b/8d/e1cabf1075b44ab3708314b2abdfec660116cd8d5680ad5f9c88709eec7a/doitlive-4.2.1.tar.gz" sha256 "46149d44c3327010f35f7957813c3f7be6c7048f609b57d5a5b94100d1c9ce69" revision 1 bottle do cellar :any_skip_relocation sha256 "87b9f99a7c93e68ad415df64adde2c868d0e87fce955e9f7d1cadcdab4c79701" => :mojave sha256 "27ed4c34462680070a0031f1eb184700bd64a81e8b0537c74526d8e13ed52208" => :high_sierra sha256 "08ca5ae44cf124916a82c1e4c0eded9f226c996bab44ac061c6273a152d8b522" => :sierra end depends_on "python" def install xy = Language::Python.major_minor_version "python3" ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" system "python3", "setup.py", "install", "--prefix=#{libexec}" bin.install Dir[libexec/"bin/*"] bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) output = Utils.popen_read("SHELL=bash #{libexec}/bin/doitlive completion") (bash_completion/"doitlive").write output output = Utils.popen_read("SHELL=zsh #{libexec}/bin/doitlive completion") (zsh_completion/"_doitlive").write output end test do system "#{bin}/doitlive", "themes", "--preview" end end