summaryrefslogtreecommitdiff
path: root/Tools/gtk/gtkdoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/gtk/gtkdoc.py')
-rw-r--r--Tools/gtk/gtkdoc.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py
index 7f7f0ad31..443dfc77b 100644
--- a/Tools/gtk/gtkdoc.py
+++ b/Tools/gtk/gtkdoc.py
@@ -107,7 +107,7 @@ class GTKDoc(object):
self.logger = logging.getLogger('gtkdoc')
- for key, value in args.iteritems():
+ for key, value in iter(args.items()):
setattr(self, key, value)
def raise_error_if_not_specified(key):
@@ -185,7 +185,7 @@ class GTKDoc(object):
process = subprocess.Popen(args, env=env, cwd=cwd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- stdout, stderr = process.communicate()
+ stdout, stderr = [b.decode("utf-8") for b in process.communicate()]
if print_output:
if stdout:
@@ -396,19 +396,21 @@ class PkgConfigGTKDoc(GTKDoc):
def __init__(self, pkg_config_path, args):
super(PkgConfigGTKDoc, self).__init__(args)
+ pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
+
if not os.path.exists(pkg_config_path):
raise Exception('Could not find pkg-config file at: %s'
% pkg_config_path)
- self.cflags += " " + self._run_command(['pkg-config',
+ self.cflags += " " + self._run_command([pkg_config,
pkg_config_path,
'--cflags'], print_output=False)
- self.ldflags += " " + self._run_command(['pkg-config',
+ self.ldflags += " " + self._run_command([pkg_config,
pkg_config_path,
'--libs'], print_output=False)
- self.version = self._run_command(['pkg-config',
+ self.version = self._run_command([pkg_config,
pkg_config_path,
'--modversion'], print_output=False)
- self.prefix = self._run_command(['pkg-config',
+ self.prefix = self._run_command([pkg_config,
pkg_config_path,
'--variable=prefix'], print_output=False)