class Vapoursynth < Formula include Language::Python::Virtualenv desc "Video processing framework with simplicity in mind" homepage "http://www.vapoursynth.com" url "https://github.com/vapoursynth/vapoursynth/archive/R41.tar.gz" sha256 "16c89d962e3909de5837c46766ed3b66202a77d3436039ba1bd79aa5bad9a4c3" head "https://github.com/vapoursynth/vapoursynth.git" bottle do sha256 "b8296e67fd911601d68912715af861ad932f3e074817c9ee447b0086d1286311" => :high_sierra sha256 "658797de185a20eff67e7d521f85496ce1e169a3465278b98815a9a3d243448b" => :sierra sha256 "e52c726e89e74bca5bcadb315036bbae27f79c266a948fa22e82ef3673c340e4" => :el_capitan end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "nasm" => :build depends_on "libass" depends_on :macos => :el_capitan # due to zimg dependency depends_on "python3" depends_on "tesseract" depends_on "zimg" resource "Cython" do url "https://files.pythonhosted.org/packages/ee/2a/c4d2cdd19c84c32d978d18e9355d1ba9982a383de87d0fcb5928553d37f4/Cython-0.27.3.tar.gz" sha256 "6a00512de1f2e3ce66ba35c5420babaef1fe2d9c43a8faab4080b0dbcc26bc64" end def install venv = virtualenv_create(buildpath/"cython", "python3") venv.pip_install "Cython" system "./autogen.sh" system "./configure", "--prefix=#{prefix}", "--with-cython=#{buildpath}/cython/bin/cython" system "make", "install" end test do py3 = Language::Python.major_minor_version "python3" ENV.prepend_path "PYTHONPATH", lib/"python#{py3}/site-packages" system "python3", "-c", "import vapoursynth" system bin/"vspipe", "--version" end end