mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
refactor: setup dev requirements
* Remove unwanted log message 🤢. It was inconsistent...this had to be
done...rip
* Fix missing import - install_python_dev_dependencies
* Don't setup node + python requirements when --dev flag is passed
This commit is contained in:
parent
30e3e725a8
commit
cd252d3476
@ -22,8 +22,9 @@ from bench.utils import (
|
||||
run_frappe_cmd,
|
||||
)
|
||||
from bench.utils.bench import (
|
||||
get_env_cmd,
|
||||
build_assets,
|
||||
get_env_cmd,
|
||||
install_python_dev_dependencies,
|
||||
restart_supervisor_processes,
|
||||
restart_systemd_processes,
|
||||
)
|
||||
|
@ -136,19 +136,19 @@ def setup_socketio():
|
||||
@click.option("--python", help="Update only Python packages", default=False, is_flag=True)
|
||||
@click.option("--dev", help="Install optional python development dependencies", default=False, is_flag=True)
|
||||
def setup_requirements(node=False, python=False, dev=False):
|
||||
if not (node or python):
|
||||
if not (node or python or dev):
|
||||
from bench.utils.bench import update_requirements
|
||||
update_requirements()
|
||||
|
||||
elif not node:
|
||||
elif not node and not dev:
|
||||
from bench.utils.bench import update_python_packages
|
||||
update_python_packages()
|
||||
|
||||
elif not python:
|
||||
elif not python and not dev:
|
||||
from bench.utils.bench import update_node_packages
|
||||
update_node_packages()
|
||||
|
||||
if dev:
|
||||
else:
|
||||
from bench.utils.bench import install_python_dev_dependencies
|
||||
install_python_dev_dependencies()
|
||||
|
||||
|
@ -107,7 +107,6 @@ def install_python_dev_dependencies(bench_path=".", apps=None):
|
||||
dev_requirements_path = os.path.join(app_path, "dev-requirements.txt")
|
||||
|
||||
if os.path.exists(dev_requirements_path):
|
||||
log(f"Installing python development dependencies for {app}")
|
||||
bench.run(f"{env_py} -m pip install -q -r {dev_requirements_path}")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user