homebrew-core/Formula/fonttools.rb

35 lines
1.3 KiB
Ruby
Raw Normal View History

class Fonttools < Formula
include Language::Python::Virtualenv
desc "Library for manipulating fonts"
homepage "https://github.com/fonttools/fonttools"
url "https://pypi.python.org/packages/d6/c4/688022e14fe8b8e899b40fd8eddece9f3e35b409267220432ac5f01e52c4/fonttools-3.1.2.zip"
sha256 "1e36cdaf52f93414f4ba9848e043630058b59f1ef4f1900bb1dd948f8e7ec55a"
head "https://github.com/fonttools/fonttools.git"
2015-06-26 18:42:14 +00:00
bottle do
2016-01-24 22:38:35 +00:00
cellar :any_skip_relocation
2016-09-29 06:03:32 +00:00
rebuild 1
sha256 "684979aedb42ed576575e2eea0aa42d3669a3242d9025be1a0c1263fae097226" => :sierra
2016-01-24 22:38:35 +00:00
sha256 "d2aca5663043850875bd16bb04af383eaee14b4b205c8595fbda20ae0867429e" => :el_capitan
sha256 "2639039f72920032e0dc6ce6faf15b837487c8561936412c437497c23bd248d0" => :yosemite
sha256 "eaa0a7decad7e731eae45b93364d18bdadbfadcf39f9a14a6f4e78d55f0b757f" => :mavericks
2015-06-26 18:42:14 +00:00
end
option "with-pygtk", "Build with pygtk support for pyftinspect"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "pygtk" => :optional
def install
virtualenv_install_with_resources
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages/FontTools"
system "python", "setup.py", "test"
end
test do
cp "/Library/Fonts/Arial.ttf", testpath
system bin/"ttx", "Arial.ttf"
end
end