mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-10 15:56:03 +00:00
perf: ensure plugin deps on startup (#858)
This commit is contained in:
@@ -1,24 +1,19 @@
|
||||
from pip._internal import main as pipmain
|
||||
|
||||
# from . import log
|
||||
|
||||
|
||||
def install(package):
|
||||
pipmain(['install', package])
|
||||
# log.reset_logging()
|
||||
|
||||
|
||||
def install_upgrade(package):
|
||||
pipmain(['install', '--upgrade', package, "-i", "https://pypi.tuna.tsinghua.edu.cn/simple",
|
||||
"--trusted-host", "pypi.tuna.tsinghua.edu.cn"])
|
||||
# log.reset_logging()
|
||||
|
||||
|
||||
def run_pip(params: list):
|
||||
pipmain(params)
|
||||
# log.reset_logging()
|
||||
|
||||
|
||||
def install_requirements(file):
|
||||
def install_requirements(file, extra_params: list = []):
|
||||
pipmain(['install', '-r', file, "-i", "https://pypi.tuna.tsinghua.edu.cn/simple",
|
||||
"--trusted-host", "pypi.tuna.tsinghua.edu.cn"])
|
||||
# log.reset_logging()
|
||||
"--trusted-host", "pypi.tuna.tsinghua.edu.cn"] + extra_params)
|
||||
|
||||
Reference in New Issue
Block a user