Skip to content

Commit

Permalink
python-launcher 1.0.0 (new formula)
Browse files Browse the repository at this point in the history
Add the Python Launcher formula

Closes #81855.

Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
  • Loading branch information
brettcannon authored and BrewTestBot committed Jul 25, 2021
1 parent 9158dfb commit 8dfb05f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Formula/python-launcher.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class PythonLauncher < Formula
desc "Launch your Python interpreter the lazy/smart way"
homepage "https://github.com/brettcannon/python-launcher"
url "https://github.com/brettcannon/python-launcher/archive/refs/tags/v1.0.0.tar.gz"
sha256 "31e5a4e50e3db4506e8484db06f6503df1225f482b40a892ffb5131b4ec11a43"
license "MIT"
head "https://github.com/brettcannon/python-launcher.git", branch: "main"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args

man1.install "docs/man-page/py.1"
fish_completion.install "completions/py.fish"
end

test do
binary = testpath/"python3.6"
binary.write("Fake Python 3.6 executable")
with_env("PATH" => testpath) do
assert_match("3.6 │ #{binary}", shell_output("#{bin}/py --list"))
end
end
end

0 comments on commit 8dfb05f

Please sign in to comment.