mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
Update bench requirements when updating as well
This commit is contained in:
parent
1c4385bf9b
commit
13f6a57ce9
@ -325,10 +325,18 @@ def update_requirements(bench_path='.'):
|
|||||||
exec_cmd("{pip} install --upgrade pip".format(pip=pip))
|
exec_cmd("{pip} install --upgrade pip".format(pip=pip))
|
||||||
|
|
||||||
apps_dir = os.path.join(bench_path, 'apps')
|
apps_dir = os.path.join(bench_path, 'apps')
|
||||||
|
|
||||||
|
# Update bench requirements
|
||||||
|
bench_req_file = os.path.join(os.path.dirname(bench.__path__[0]), 'requirements.txt')
|
||||||
|
install_requirements(pip, bench_req_file)
|
||||||
|
|
||||||
for app in os.listdir(apps_dir):
|
for app in os.listdir(apps_dir):
|
||||||
req_file = os.path.join(apps_dir, app, 'requirements.txt')
|
req_file = os.path.join(apps_dir, app, 'requirements.txt')
|
||||||
if os.path.exists(req_file):
|
install_requirements(pip, req_file)
|
||||||
exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
|
|
||||||
|
def install_requirements(pip, req_file):
|
||||||
|
if os.path.exists(req_file):
|
||||||
|
exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
|
||||||
|
|
||||||
def backup_site(site, bench_path='.'):
|
def backup_site(site, bench_path='.'):
|
||||||
bench.set_frappe_version(bench_path=bench_path)
|
bench.set_frappe_version(bench_path=bench_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user