From 356d59a38d12b66d40a1f1f0543fa5e4f02db67f Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Thu, 18 Nov 2010 10:06:51 +0100 Subject: [PATCH] fixed setup.py --- config.ru | 13 ++++++++----- setup.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/config.ru b/config.ru index cc873d5d..faddae81 100644 --- a/config.ru +++ b/config.ru @@ -3,13 +3,16 @@ require 'sinatra' get '/hi' do - for i in 1..10 - puts "ruby" - #Fiber.yield + class Response + def each + for i in 1..10 + yield "ciao
" + Fiber.yield + end + end end - - "Hello World!" + Response.new end run Sinatra::Application diff --git a/setup.py b/setup.py index 8adb33b1..902ab56f 100644 --- a/setup.py +++ b/setup.py @@ -11,8 +11,10 @@ from setuptools.command.build_ext import build_ext class uWSGIBuilder(build_ext): def run(self): - uc.parse_vars() - uc.build_uwsgi(sys.prefix + '/bin/' + uc.UWSGI_BIN_NAME) + conf = uc.uConf('buildconf/default.ini') + bin_name = conf.get('bin_name') + conf.set('bin_name', sys.prefix + '/bin/' + bin_name) + uc.build_uwsgi( conf ) class uWSGIInstall(install): @@ -21,8 +23,11 @@ class uWSGIInstall(install): # hack, hack and still hack. We need to find a solution for 0.9.6 if self.record: record_file = open(self.record,'w') - uc.parse_vars() - uc.build_uwsgi(sys.prefix + '/bin/' + uc.UWSGI_BIN_NAME) + + conf = uc.uConf('buildconf/default.ini') + bin_name = conf.get('bin_name') + conf.set('bin_name', sys.prefix + '/bin/' + bin_name) + uc.build_uwsgi( conf ) class uWSGIDistribution(Distribution):