dblatex/dblatex-0.3.10-use-shutil-which.patch

39 lines
928 B
Diff
Raw Normal View History

From e90833a7f4e8c64009bec11f569e89397203b822 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Tue, 26 Jun 2018 17:41:19 +0200
Subject: [PATCH 3/4] Use which from shutil
---
setup.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/setup.py b/setup.py
index 86619ec..799c1d2 100644
--- a/setup.py
+++ b/setup.py
@@ -208,17 +208,15 @@ class Build(build):
def find_programs(utils):
- sys.path.append("lib")
- from contrib.which import which
+ import shutil
util_paths = {}
missed = []
for util in utils:
- try:
- path = which.which(util)
+ path = shutil.which(util)
+ if path:
util_paths[util] = path
- except which.WhichError:
+ else:
missed.append(util)
- sys.path.remove("lib")
return (util_paths, missed)
def kpsewhich(tex_file):
--
2.17.1