tools: Change more tools to using pip for dependencies.

This commit is contained in:
Andrew Hamilton 2018-09-14 21:01:36 +10:00
parent 6ab508a251
commit a060c7f3ae
2 changed files with 7 additions and 6 deletions

View file

@ -321,9 +321,10 @@ def pydoc(path):
return status, fill3.Text(_fix_input(stdout)) return status, fill3.Text(_fix_input(stdout))
@deps(deps={"mypy"}, url="mypy", executables={"mypy"}) @deps(deps={"pip3/mypy"}, url="mypy", executables={"mypy"})
def mypy(path): def mypy(path):
stdout, stderr, returncode = _do_command(["mypy", path], timeout=TIMEOUT) stdout, stderr, returncode = _do_command(
[PYTHON_EXECUTABLE, "-m", "mypy", path], timeout=TIMEOUT)
status = Status.ok if returncode == 0 else Status.problem status = Status.ok if returncode == 0 else Status.problem
return status, fill3.Text(stdout) return status, fill3.Text(stdout)
@ -527,7 +528,7 @@ def _resize_image(image, new_width):
PIL.Image.ANTIALIAS) PIL.Image.ANTIALIAS)
@deps(deps={"python3-pil"}, url="python3-pil") @deps(deps={"pip3/pillow"}, url="python3-pil")
def pil(path): def pil(path):
with open(path, "rb") as image_file: with open(path, "rb") as image_file:
with PIL.Image.open(image_file).convert("RGB") as image: with PIL.Image.open(image_file).convert("RGB") as image:

View file

@ -142,7 +142,7 @@ tools_for_extensions = [
success_status = "normal" success_status = "normal"
[pdf2txt] [pdf2txt]
dependencies = ["python-pdfminer"] dependencies = ["pip/pdfminer"]
url = "python-pdfminer" url = "python-pdfminer"
command = "pdf2txt" command = "pdf2txt"
success_status = "normal" success_status = "normal"
@ -233,9 +233,9 @@ tools_for_extensions = [
command = "golint -set_exit_status" command = "golint -set_exit_status"
[yamllint] [yamllint]
dependencies = ["yamllint"] dependencies = ["pip3/yamllint"]
url = "yamllint" url = "yamllint"
command = "yamllint" command = "python3.7 -m yamllint"
[mediainfo] [mediainfo]
dependencies = ["mediainfo"] dependencies = ["mediainfo"]