Skip to content

Commit

Permalink
Merge pull request #4 from dabapps/python-311
Browse files Browse the repository at this point in the history
Depend on [email protected] for now
  • Loading branch information
jordaneb authored Mar 18, 2024
2 parents eaf38e4 + d5f3fd3 commit 3fd5b68
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions Formula/crab.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Crab < Formula
sha256 "fdac36fe63a0a822e44c14dbd08e7b64106317fadeb31239531491772a0b36bc"
head "https://github.com/dabapps/crab.git"

depends_on "python@3"
depends_on "python@3.11"

def install
venv = virtualenv_create(libexec, "python3", without_pip: false)
Expand All @@ -16,36 +16,12 @@ def install
venv.pip_install_and_link buildpath
end

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{bin}/crab</string>
<string>router</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
<key>StandardOutPath</key>
<string>#{var}/log/crab.log</string>
<key>StandardErrorPath</key>
<string>#{var}/log/crab.log</string>
</dict>
</plist>
EOS
end

service do
name macos: "#{plist_name}"
run [bin/"crab", "router"]
keep_alive true
working_dir HOMEBREW_PREFIX
log_path var/"log/crab.log"
error_log_path var/"log/crab.log"
end

test do
Expand Down

0 comments on commit 3fd5b68

Please sign in to comment.