zulip_bots/provision: Use subprocess and stop being --quiet.

The bot provisioning code was breaking due to pip.main not being
a function anymore. Also, I don't think we should pass the --quiet
option here. I felt it was good to have some visual information
about what deps were being installed, just in case if something
went wrong and there was a conflict, the user should be able to
see it.
This commit is contained in:
Eeshan Garg 2018-06-05 20:57:36 -02:30
parent df428b4821
commit f69f7f41d0

View file

@ -6,6 +6,7 @@ import argparse
import logging
import os
import sys
import subprocess
import glob
import pip
from typing import Iterator
@ -26,7 +27,7 @@ def provision_bot(path_to_bot, force):
logging.info('Installing dependencies for {}...'.format(bot_name))
# pip install -r $BASEDIR/requirements.txt -t $BASEDIR/bot_dependencies --quiet
rcode = pip.main(['install', '-r', req_path, '--quiet'])
rcode = subprocess.call(['pip', 'install', '-r', req_path])
if rcode != 0:
logging.error('Error. Check output of `pip install` above for details.')