require 'formula' class Uwsgi < Formula homepage 'http://projects.unbit.it/uwsgi/' url 'http://projects.unbit.it/downloads/uwsgi-1.9.5.tar.gz' sha1 '3f37d61ebce10d2ec0380553022f6e6cb05e03d9' depends_on 'pcre' depends_on 'libyaml' def install arch = MacOS.prefer_64_bit? ? 'x86_64' : 'i386' %w{CFLAGS LDFLAGS}.each { |e| ENV.append e, "-arch #{arch}" } system "python", "uwsgiconfig.py", "--build" bin.install "uwsgi" end end