def init(path, apps_path=None, no_procfile=False, no_backups=False, no_auto_update=False, frappe_path=None, frappe_branch=None, wheel_cache_dir=None, verbose=False, clone_from=None, skip_redis_config_generation=False, clone_without_update=False, ignore_exist = False, skip_assets=False, python='python3'): from bench.app import get_app, install_apps_from_path from bench.config import redis from bench.config.common_site_config import make_config from bench.config.procfile import setup_procfile from bench.patches import set_all_patches_executed if os.path.exists(path) and not ignore_exist: log('Path {path} already exists!'.format(path=path)) sys.exit(0) elif not os.path.exists(path): # only create dir if it does not exist os.makedirs(path) for dirname in folders_in_bench: try: os.makedirs(os.path.join(path, dirname)) except OSError as e: if e.errno == errno.EEXIST: pass setup_logging() setup_env(bench_path=path, python=python) make_config(path) if clone_from: clone_apps_from(bench_path=path, clone_from=clone_from, update_app=not clone_without_update) else: if not frappe_path: frappe_path = 'https://github.com/frappe/frappe.git' get_app(frappe_path, branch=frappe_branch, bench_path=path, skip_assets=True, verbose=verbose) if apps_path: install_apps_from_path(apps_path, bench_path=path) bench.set_frappe_version(bench_path=path) if bench.FRAPPE_VERSION > 5: if not skip_assets: update_node_packages(bench_path=path) set_all_patches_executed(bench_path=path) if not skip_assets: build_assets(bench_path=path) if not skip_redis_config_generation: redis.generate_config(path) if not no_procfile: setup_procfile(path) if not no_backups: setup_backups(bench_path=path) if not no_auto_update: setup_auto_update(bench_path=path) copy_patches_txt(path)
def setup_config(): "overwrite or make config.json" from bench.config.common_site_config import make_config make_config('.')
def setup_config(): from bench.config.common_site_config import make_config make_config(".")