homebrew-core/Formula/uwsgi.rb

26 lines
549 B
Ruby
Raw Normal View History

require 'formula'
class Uwsgi <Formula
2010-02-01 20:18:30 +00:00
url 'http://projects.unbit.it/downloads/uwsgi-0.9.4.tar.gz'
homepage 'http://projects.unbit.it/uwsgi/'
2010-02-01 20:18:30 +00:00
md5 '07c633072b48c9790fa5d4030c7c9aa3'
2010-01-13 11:06:52 +00:00
def python_version
`python -c "import sys; print '%s.%s' % sys.version_info[:2]"`.chomp
end
def install
2010-02-01 20:18:30 +00:00
case python_version
when '2.5'
makefile = "Makefile"
program = "uwsgi"
when '2.6'
makefile = "Makefile.Py26"
program = "uwsgi26"
end
2010-02-01 20:18:30 +00:00
system "make -f #{makefile}"
bin.install program
end
end