62 lines
2.4 KiB
Ruby
62 lines
2.4 KiB
Ruby
class Passpie < Formula
|
|
desc "Manage login credentials from the terminal"
|
|
homepage "https://github.com/marcwebbie/passpie"
|
|
url "https://pypi.python.org/packages/75/74/81b61b369c029454647c0a662d08c76bb7fe4757cf761c3890884b71096d/passpie-1.4.2.tar.gz"
|
|
sha256 "c6faf0b6cb1a1c8f942b93fbe43b10e66a06bae1b263e544e7cd26add5b130a7"
|
|
head "https://github.com/marcwebbie/passpie.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "42e24bd9c51c488d9c67d886cc22ffb86713ac72573e87ad362c6c5cf32d0c7b" => :el_capitan
|
|
sha256 "dc749a017e65064c6c6fe1a289910d27bddab0ac5d22671986be554dcaa14d5d" => :yosemite
|
|
sha256 "1d38d62088f5d48cece28dc3fc47bb8a2a9835db328db04e0f62d51a12d2f0d9" => :mavericks
|
|
end
|
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
depends_on :gpg
|
|
|
|
resource "click" do
|
|
url "https://pypi.python.org/packages/source/c/click/click-6.2.tar.gz"
|
|
sha256 "fba0ff70f5ebb4cebbf64c40a8fbc222fb7cf825237241e548354dabe3da6a82"
|
|
end
|
|
|
|
resource "PyYAML" do
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
|
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
|
end
|
|
|
|
resource "rstr" do
|
|
url "https://pypi.python.org/packages/source/r/rstr/rstr-2.2.3.tar.gz"
|
|
sha256 "10a58eb08a7e3735eddc8f32f3db419797dadb6335b02b94dcd8d741363d79e9"
|
|
end
|
|
|
|
resource "tabulate" do
|
|
url "https://pypi.python.org/packages/source/t/tabulate/tabulate-0.7.5.tar.gz"
|
|
sha256 "9071aacbd97a9a915096c1aaf0dc684ac2672904cd876db5904085d6dac9810e"
|
|
end
|
|
|
|
resource "tinydb" do
|
|
url "https://pypi.python.org/packages/source/t/tinydb/tinydb-3.1.2.zip"
|
|
sha256 "6d9df6c30fc37dad487c23bfadfa6161de422a7f2b16b55d779df88559fc9095"
|
|
end
|
|
|
|
def install
|
|
xy = Language::Python.major_minor_version "python"
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
|
|
%w[click rstr tabulate tinydb PyYAML].each do |r|
|
|
resource(r).stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
end
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages"
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
|
end
|
|
|
|
test do
|
|
system bin/"passpie", "-D", "passpiedb", "init", "--force", "--passphrase", "s3cr3t"
|
|
end
|
|
end
|