1
1
Fork 0

🔧 Update requirements-hosted.txt

develop
Corentin 3 months ago
parent 5d78a19e88
commit 419dc998d6
  1. 12
      bip/mink/update.py
  2. 0
      requirements-hosted.txt

@ -27,7 +27,7 @@ STEPS = 7
_user_directory = str(Path.home())
python_requirements = os.path.join(bip_root_directory, "requirements.txt")
dcc_requirements = os.path.join(bip_root_directory, "requirements_dcc.txt")
dcc_requirements = os.path.join(bip_root_directory, "requirements-hosted.txt")
desktop = os.path.join(_user_directory, "Desktop")
start_menu = os.path.join(
_user_directory,
@ -77,6 +77,11 @@ def update(to_checkout, type_, source, callback, logger):
with open(python_requirements, "r") as file:
old_python_requirements_data = file.read()
# Temp patch (for the update from 3.0.27 to 3.0.28
global dcc_requirements
if not os.path.exists(dcc_requirements):
dcc_requirements = os.path.join(bip_root_directory, "requirements-hosted.txt")
with open(dcc_requirements, "r") as file:
old_dcc_requirements_data = file.read()
@ -119,6 +124,7 @@ def update(to_checkout, type_, source, callback, logger):
with open(python_requirements, "r") as file:
new_python_requirements_data = file.read()
with open(dcc_requirements, "r") as file:
new_dcc_requirements_data = file.read()
@ -143,7 +149,7 @@ def update(to_checkout, type_, source, callback, logger):
callback("Installing", "Dependencies for DCC")
if old_dcc_requirements_data != new_dcc_requirements_data:
logger.info("Updating DCC venv from requirements_dcc.txt")
logger.info("Updating DCC venv from requirements-hosted.txt")
activate_bat = os.path.join(dcc_directory, "Scripts", "activate.bat")
command = f'"{activate_bat}" & pip install -r "{dcc_requirements}" --upgrade'
@ -151,7 +157,7 @@ def update(to_checkout, type_, source, callback, logger):
subprocess.run(command)
else:
logger.info(
"Skipping DCC dependencies update: no changes in requirements_dcc.txt"
"Skipping DCC dependencies update: no changes in requirements-hosted.txt"
)
# Install trackers dependencies

Loading…
Cancel
Save