aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJannis Leidel2009-12-01 09:52:29 +0100
committerMax Howell2009-12-02 12:53:00 +0000
commitbd437843a26d501083fb66c64fad0cc601724cbe (patch)
treefcf73f2230bc06778298017e4acbd0a2c24c4050 /Library/Formula
parent32060a875a07ead8ddc001470d0de0ffb4b041f3 (diff)
downloadhomebrew-bd437843a26d501083fb66c64fad0cc601724cbe.tar.bz2
Added uWSGI formula
"uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server, aimed for professional python webapps deployment and development."
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/uwsgi.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/Library/Formula/uwsgi.rb b/Library/Formula/uwsgi.rb
new file mode 100644
index 000000000..3228c178d
--- /dev/null
+++ b/Library/Formula/uwsgi.rb
@@ -0,0 +1,23 @@
+require 'formula'
+
+class Uwsgi <Formula
+ url 'http://projects.unbit.it/downloads/uwsgi-0.9.3.tar.gz'
+ homepage 'http://projects.unbit.it/uwsgi/'
+ md5 'dd72040daea5a9ee982f3b3b98946ed9'
+
+ def install
+ # Getting the current Python version to determine pythonX.Y-config
+ py_version = `python -c "import sys; print '%s.%s' % sys.version_info[:2]"`.chomp
+ # The arch flags should match your Python's arch flags.
+ archs = arch_for_command "`which python`"
+ arch_flags = ''
+ archs.each do |a|
+ arch_flags += " -arch #{a}"
+ end
+ FileUtils.mv 'Makefile.OSX.ub.Py25', 'Makefile.OSX'
+ inreplace "Makefile.OSX", "python2.5-config", "python#{py_version}-config"
+ inreplace "Makefile.OSX", "-arch ppc -arch i386", "#{arch_flags}"
+ system "make -f Makefile.OSX"
+ bin.install "uwsgi"
+ end
+end