Commit 8c8bd08e authored by Ellis Percival's avatar Ellis Percival
Browse files

Fix requirements installation broken since pip 10. #33

parent fedd2c94
......@@ -212,14 +212,15 @@ def install_missing_requirements(module):
if pkgs_installed.find(pkg_resources.Requirement.parse(req)) is None:
pkgs_required.append(req)
if pkgs_required:
from pip.commands.install import InstallCommand
from pip.status_codes import SUCCESS
cmd = InstallCommand()
result = cmd.main(pkgs_required)
if result != SUCCESS:
from subprocess import check_call, CalledProcessError
try:
check_call(['/usr/bin/env', 'pip', 'install'] + pkgs_required)
except CalledProcessError as err:
raise CannotInstallModuleRequirements(
"Unable to install packages for module %r (%s)..." % (
module, pkgs_required))
"Unable to install packages for module %r (%s): %s" % (
module, pkgs_required, err
)
)
def output_name_from_topic(topic, topic_prefix, suffix):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment