forked from deepfakes/faceswap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_deps.py
32 lines (23 loc) · 738 Bytes
/
update_deps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
""" Installs any required third party libs for faceswap.py
Checks for installed Conda / Pip packages and updates accordingly
"""
from setup import Environment, Install, Output
_LOGGER = None
def output(msg):
""" Output to print or logger """
if _LOGGER is not None:
_LOGGER.info(msg)
else:
Output().info(msg)
def main(logger=None):
""" Check for and update dependencies """
if logger is not None:
global _LOGGER # pylint:disable=global-statement
_LOGGER = logger
output("Updating dependencies...")
update = Environment(logger=logger, updater=True)
Install(update)
output("Dependencies updated")
if __name__ == "__main__":
main()