pipx 0.13.0.1 (new formula)

Closes #39483.

Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
This commit is contained in:
al.johri@gmail.com 2019-05-01 14:36:41 -04:00 committed by Izaak Beekman
parent b905243795
commit dfbe626a28
No known key found for this signature in database
GPG key ID: A93CE70D8021BD0F

26
Formula/pipx.rb Normal file
View file

@ -0,0 +1,26 @@
class Pipx < Formula
include Language::Python::Virtualenv
desc "Execute binaries from Python packages in isolated environments"
homepage "https://github.com/pipxproject/pipx"
url "https://files.pythonhosted.org/packages/b5/42/bdf9b6cc0af79222f69776d931ef79235946095b16594bac1f6bd81f435f/pipx-0.13.0.1.tar.gz"
sha256 "5134955d0d0595ca8040ecfa4215f2ddb84d34569c118ab2cde84b1d2b240b42"
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", *Language::Python.setup_install_args(libexec)
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
assert_match "PIPX_HOME", shell_output("#{bin}/pipx --help")
system "#{bin}/pipx", "install", "csvkit"
assert_true FileTest.exist?("#{testpath}/.local/bin/csvjoin")
system "#{bin}/pipx", "uninstall", "csvkit"
assert_no_match Regexp.new("csvjoin"), shell_output("#{bin}/pipx list")
end
end