class EyeD3 < Formula desc "Work with ID3 metadata in .mp3 files" homepage "http://eyed3.nicfit.net/" url "http://eyed3.nicfit.net/releases/eyeD3-0.8.2.tar.gz" sha256 "ca6d094c256270a1a64e3d60d114a7a6e4b2c5777201ed8f4670f573af18ac56" bottle do cellar :any_skip_relocation sha256 "678c663366717665bfe79d307b3d93ce2a594e27a680f19e0d84a6b1e84a1594" => :high_sierra sha256 "b36cabe996a48a9dd14e177e9cab30545e1a6b0d1c614025341cda9f69a73903" => :sierra sha256 "2dfd39304a741c18c5816d481c9b0ef80eee367f2039f9b4f906660f0d6cb2f3" => :el_capitan end depends_on :python if MacOS.version <= :snow_leopard depends_on "libmagic" # Looking for documentation? Please submit a PR to build some! # See https://github.com/Homebrew/homebrew/issues/32770 for previous attempt. resource "pathlib" do url "https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz" sha256 "6940718dfc3eff4258203ad5021090933e5c04707d5ca8cc9e73c94a7894ea9f" end resource "python-magic" do url "https://files.pythonhosted.org/packages/65/0b/c6b31f686420420b5a16b24a722fe980724b28d76f65601c9bc324f08d02/python-magic-0.4.13.tar.gz" sha256 "604eace6f665809bebbb07070508dfa8cabb2d7cb05be9a56706c60f864f1289" 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 # Install in our prefix, not the first-in-the-path python site-packages dir. ENV.prepend_create_path "PYTHONPATH", libexec+"lib/python2.7/site-packages" system "python", "setup.py", "install", "--prefix=#{libexec}" share.install "docs/plugins", "docs/cli.rst" bin.install Dir[libexec/"bin/*"] bin.env_script_all_files(libexec+"bin", :PYTHONPATH => ENV["PYTHONPATH"]) end test do touch "temp.mp3" system "#{bin}/eyeD3", "-a", "HomebrewYo", "-n", "37", "temp.mp3" end end