mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
refactor(migrate_env): virtualenv -> venv
This commit is contained in:
parent
4f0193ca93
commit
e37df969c1
@ -175,10 +175,6 @@ def migrate_env(python, backup=False):
|
|||||||
nvenv = "env"
|
nvenv = "env"
|
||||||
path = os.getcwd()
|
path = os.getcwd()
|
||||||
python = which(python)
|
python = which(python)
|
||||||
virtualenv = which("virtualenv")
|
|
||||||
if not virtualenv:
|
|
||||||
raise FileNotFoundError("`virtualenv` not found. Install it and try again.")
|
|
||||||
|
|
||||||
pvenv = os.path.join(path, nvenv)
|
pvenv = os.path.join(path, nvenv)
|
||||||
|
|
||||||
# Clear Cache before Bench Dies.
|
# Clear Cache before Bench Dies.
|
||||||
@ -218,7 +214,7 @@ def migrate_env(python, backup=False):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
logger.log(f"Setting up a New Virtual {python} Environment")
|
logger.log(f"Setting up a New Virtual {python} Environment")
|
||||||
exec_cmd(f"{virtualenv} --python {python} {pvenv}")
|
exec_cmd(f"{python} -m venv {pvenv}")
|
||||||
|
|
||||||
# Install frappe first
|
# Install frappe first
|
||||||
_install_app("frappe")
|
_install_app("frappe")
|
||||||
|
Loading…
Reference in New Issue
Block a user