def _setup(): sites = [] for site_path in get_environ_list('KS_SITES'): try: site = Site(site_path) except ValueError as e: log.log(5, 'invalid site %s: %s' % (site_path, e.args[0])) else: sites.append(site.python_path) try: add_site_list(sites) except Exception: warnings.warn('Error while adding sites %s:\n%s' % (sites, traceback.format_exc().rstrip()))
def _setup(): sites = [] for site_path in get_environ_list('SITETOOLS_SITES'): try: site = Site(site_path) except ValueError as e: log.log(5, 'invalid site %s: %s' % (site_path, e.args[0])) else: sites.append(site.python_path) try: add_site_list(sites) except Exception: warnings.warn('Error while adding sites %s:\n%s' % (sites, traceback.format_exc().rstrip()))
def get_dev_site_patterns(): return get_environ_list('KS_DEV_SITES', ['~/dev/venv/bin/python', '~/dev'])
def get_dev_site_patterns(): return get_environ_list('SITETOOLS_DEV_SITES', ['~/dev/venv/bin/python', '~/dev'])