2021.4.1 #11
1
cpl.json
1
cpl.json
@ -21,6 +21,7 @@
|
|||||||
"pyfiglet==0.8.post1",
|
"pyfiglet==0.8.post1",
|
||||||
"pynput==1.7.3",
|
"pynput==1.7.3",
|
||||||
"SQLAlchemy==1.3.23",
|
"SQLAlchemy==1.3.23",
|
||||||
|
"setuptools==54.1.1",
|
||||||
"tabulate==0.8.9",
|
"tabulate==0.8.9",
|
||||||
"termcolor==1.1.0",
|
"termcolor==1.1.0",
|
||||||
"watchdog==2.0.2"
|
"watchdog==2.0.2"
|
||||||
|
@ -49,7 +49,12 @@ class UpdateService(CommandABC):
|
|||||||
stderr=subprocess.DEVNULL
|
stderr=subprocess.DEVNULL
|
||||||
)
|
)
|
||||||
|
|
||||||
self._project_json_update_dependency(package, Pip.get_package(name))
|
new_package = Pip.get_package(name)
|
||||||
|
if new_package is None:
|
||||||
|
Console.error(f'Invalid name: {name}')
|
||||||
|
return
|
||||||
|
|
||||||
|
self._project_json_update_dependency(package, new_package)
|
||||||
|
|
||||||
def _check_project_dependencies(self):
|
def _check_project_dependencies(self):
|
||||||
Console.spinner(
|
Console.spinner(
|
||||||
@ -66,14 +71,15 @@ class UpdateService(CommandABC):
|
|||||||
spinner_foreground_color=ForegroundColorEnum.cyan
|
spinner_foreground_color=ForegroundColorEnum.cyan
|
||||||
)
|
)
|
||||||
|
|
||||||
Console.write_line('\tAvailable updates for packages:')
|
|
||||||
table = str(table_str, 'utf-8').split('\n')
|
table = str(table_str, 'utf-8').split('\n')
|
||||||
for row in table:
|
if len(table) > 1 and table[0] != '':
|
||||||
Console.write_line(f'\t{row}')
|
Console.write_line('\tAvailable updates for packages:')
|
||||||
|
for row in table:
|
||||||
|
Console.write_line(f'\t{row}')
|
||||||
|
|
||||||
Console.set_foreground_color(ForegroundColorEnum.yellow)
|
Console.set_foreground_color(ForegroundColorEnum.yellow)
|
||||||
Console.write_line(f'\tUpdate with {sys.executable} -m pip install --upgrade <package>')
|
Console.write_line(f'\tUpdate with {sys.executable} -m pip install --upgrade <package>')
|
||||||
Console.set_foreground_color(ForegroundColorEnum.default)
|
Console.set_foreground_color(ForegroundColorEnum.default)
|
||||||
|
|
||||||
def _project_json_update_dependency(self, old_package: str, new_package: str):
|
def _project_json_update_dependency(self, old_package: str, new_package: str):
|
||||||
content = ''
|
content = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user