class Doitlive < Formula desc "Replay stored shell commands for live presentations" homepage "https://doitlive.readthedocs.io/en/latest/" url "https://files.pythonhosted.org/packages/e5/d9/4ce969d98f521c253ec3b15a0c759104a01061ac90fb9d8636b015bcb4ea/doitlive-4.3.0.tar.gz" sha256 "4cb1030e082d8649f10a61d599d3ff3bcad7f775e08f0e68ee06882e06d0190f" revision 4 bottle do cellar :any_skip_relocation sha256 "6cfd719360efbc422871ac6a239da51cfe35609349821f2daef67430316fd8e0" => :catalina sha256 "99b40de1ae3aa4020d8d31c2fadd8aa59a423506957d173a4740bb4fdab418a9" => :mojave sha256 "895220860c7b8b6a2b27c2594a9c49394debcd93bb375d01d23a824e5f24dd60" => :high_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