2009-12-01 08:52:29 +00:00
|
|
|
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'
|
2009-12-01 08:52:29 +00:00
|
|
|
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
|
|
|
|
|
2009-12-01 08:52:29 +00:00
|
|
|
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"
|
2009-12-01 08:52:29 +00:00
|
|
|
end
|
2010-02-01 20:18:30 +00:00
|
|
|
|
|
|
|
system "make -f #{makefile}"
|
|
|
|
bin.install program
|
2009-12-01 08:52:29 +00:00
|
|
|
end
|
|
|
|
end
|