diff options
| author | Jannis Leidel | 2009-12-01 09:52:29 +0100 |
|---|---|---|
| committer | Max Howell | 2009-12-02 12:53:00 +0000 |
| commit | bd437843a26d501083fb66c64fad0cc601724cbe (patch) | |
| tree | fcf73f2230bc06778298017e4acbd0a2c24c4050 /Library/Formula | |
| parent | 32060a875a07ead8ddc001470d0de0ffb4b041f3 (diff) | |
| download | homebrew-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.rb | 23 |
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 |
