def run(self): global uwsgi_compiled if not uwsgi_compiled: conf = uc.uConf(get_profile()) patch_bin_path(self, conf) uc.build_uwsgi(conf) uwsgi_compiled = True
def uwsgi_setup(self): profile = os.environ.get( 'UWSGI_PROFILE') or 'buildconf/%s.ini' % self.UWSGI_PROFILE if not profile.endswith('.ini'): profile = profile + '.ini' if '/' not in profile: profile = 'buildconf/' + profile # FIXME: update uwsgiconfig to properly set _EVERYTHING_! config = uwsgiconfig.uConf(profile) # insert in the beginning so UWSGI_PYTHON_NOLIB is exported # before the python plugin compiles ep = config.get('embedded_plugins').split(',') if self.UWSGI_PLUGIN in ep: ep.remove(self.UWSGI_PLUGIN) ep.insert(0, self.UWSGI_PLUGIN) config.set('embedded_plugins', ','.join(ep)) config.set('as_shared_library', 'true') config.set('bin_name', self.get_ext_fullpath(self.UWSGI_NAME)) try: os.makedirs(os.path.dirname(config.get('bin_name'))) except OSError as e: if e.errno != errno.EEXIST: raise self.uwsgi_profile = profile self.uwsgi_config = config
def uwsgi_setup(self): default = ( '__pypy__' in sys.builtin_module_names and 'pypy' or 'default' ) profile = ( os.environ.get('UWSGI_PROFILE') or 'buildconf/%s.ini' % default ) if not profile.endswith('.ini'): profile = profile + '.ini' if not '/' in profile: profile = 'buildconf/' + profile #FIXME: update uwsgiconfig to properly set _EVERYTHING_! config = uwsgiconfig.uConf(profile) # insert in the beginning so UWSGI_PYTHON_NOLIB is exported # before the python plugin compiles ep = config.get('embedded_plugins').split(',') if self.UWSGI_PLUGIN in ep: ep.remove(self.UWSGI_PLUGIN) ep.insert(0, self.UWSGI_PLUGIN) config.set('embedded_plugins', ','.join(ep)) config.set('as_shared_library', 'true') config.set('bin_name', self.get_ext_fullpath(self.UWSGI_NAME)) try: os.makedirs(os.path.dirname(config.get('bin_name'))) except OSError as e: if e.errno != errno.EEXIST: raise self.uwsgi_profile = profile self.uwsgi_config = config
def get_extra_require(): req = [] conf = uc.uConf(get_profile()) plugins = conf.get('main_plugin') if plugins: plugins = plugins.split(',') if 'greenlet' in plugins: req.append('greenlet') return req