class Sops < Formula desc "Editor of encrypted files" homepage "https://github.com/mozilla/sops" url "https://pypi.python.org/packages/source/s/sops/sops-1.10.tar.gz" sha256 "65cf3c4777d389a0f812887e70bbfc36dc6bf3dbb16c18c086ca0b8b63523dfa" bottle do cellar :any sha256 "47856b5bb36b3dab1442b97f98104e42c8a07b9649cdb0d9aec65ac457a5399a" => :el_capitan sha256 "f47c3df73d631537a23ce4048b7736f53020c825129530f9cab0b180a0e22313" => :yosemite sha256 "06df924aefb9f43b2fecbb12bd98ff6e6794eed8c07c241c23a700f90202da7a" => :mavericks end depends_on "libffi" depends_on "libyaml" depends_on "openssl" depends_on :python if MacOS.version <= :snow_leopard resource "boto3" do url "https://pypi.python.org/packages/source/b/boto3/boto3-1.3.0.tar.gz" sha256 "8f85b9261a5b4606d883248a59ef1a4e82fd783602dbec8deac4d2ad36a1b6f4" end resource "botocore" do url "https://pypi.python.org/packages/source/b/botocore/botocore-1.4.8.tar.gz" sha256 "47bcd9bdcde8661f79a031da68f21bd86cc5ecf07cec5cd1de0af114911d1806" end resource "cffi" do url "https://pypi.python.org/packages/source/c/cffi/cffi-1.5.2.tar.gz" sha256 "da9bde99872e46f7bb5cff40a9b1cc08406765efafb583c704de108b6cb821dd" end resource "cryptography" do url "https://pypi.python.org/packages/source/c/cryptography/cryptography-1.3.1.tar.gz" sha256 "b4b36175e0f95ddc88435c26dbe3397edce48e2ff5fe41d504cdb3beddcd53e2" end resource "docutils" do url "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz" sha256 "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa" end resource "enum34" do url "https://pypi.python.org/packages/source/e/enum34/enum34-1.1.2.tar.gz" sha256 "2475d7fcddf5951e92ff546972758802de5260bf409319a9f1934e6bbc8b1dc7" end resource "futures" do url "https://pypi.python.org/packages/source/f/futures/futures-3.0.5.tar.gz" sha256 "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df" end resource "idna" do url "https://pypi.python.org/packages/source/i/idna/idna-2.1.tar.gz" sha256 "ed36f281aebf3cd0797f163bb165d84c31507cedd15928b095b1675e2d04c676" end resource "ipaddress" do url "https://pypi.python.org/packages/source/i/ipaddress/ipaddress-1.0.16.tar.gz" sha256 "5a3182b322a706525c46282ca6f064d27a02cffbd449f9f47416f1dc96aa71b0" end resource "jmespath" do url "https://pypi.python.org/packages/source/j/jmespath/jmespath-0.9.0.tar.gz" sha256 "08dfaa06d4397f283a01e57089f3360e3b52b5b9da91a70e1fd91e9f0cdd3d3d" end resource "pyasn1" do url "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-0.1.9.tar.gz" sha256 "853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f" end resource "pycparser" do url "https://pypi.python.org/packages/source/p/pycparser/pycparser-2.14.tar.gz" sha256 "7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73" end resource "python-dateutil" do url "https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.5.2.tar.gz" sha256 "063907ef47f6e187b8fe0728952e4effb587a34f2dc356888646f9b71fbb2e4b" end resource "ruamel.ordereddict" do url "https://pypi.python.org/packages/source/r/ruamel.ordereddict/ruamel.ordereddict-0.4.9.tar.gz" sha256 "7058c470f131487a3039fb9536dda9dd17004a7581bdeeafa836269a36a2b3f6" end resource "ruamel.yaml" do url "https://pypi.python.org/packages/source/r/ruamel.yaml/ruamel.yaml-0.11.7.tar.gz" sha256 "c89363e16c9eafb9354e55d757723efeff8682d05e56b0881450002ffb00a344" end resource "setuptools" do url "https://pypi.python.org/packages/source/s/setuptools/setuptools-20.6.7.tar.gz" sha256 "d20152ee6337323d3b6d95cd733fb719d6b4f3fbc40f61f7a48e5a1bb96478b2" end resource "six" do url "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz" sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" end def install ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages" resources.each do |r| r.stage do system "python", *Language::Python.setup_install_args(libexec/"vendor") end end # Namespace packages and .pth files aren't processed from PYTHONPATH. touch libexec/"vendor/lib/python2.7/site-packages/ruamel/__init__.py" ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/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}/sops", "-v" end end