Don't convert pkg-config output to utf-8 v1.6.46
authorBenjamin Radel <benjamin@radel.tk>
Tue, 16 Jan 2024 19:39:05 +0000 (20:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Jan 2024 20:59:14 +0000 (21:59 +0100)
Don't convert pkg-config output to utf-8 to prevent failure if obscure
non ascii characters are present

wscript

diff --git a/wscript b/wscript
index 06e2660aa8c6a97391ffb51117392ce0f7a0dd87..855de57abaa6d65508c54b0b6d71e70248a050aa 100644 (file)
--- a/wscript
+++ b/wscript
@@ -141,8 +141,7 @@ def configure(conf):
     # Find the icu- libraries on the system as we need to link to them when we look for boost locale.
     locale_libs = ['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix]
     for pkg in subprocess.check_output(['pkg-config', '--list-all']).splitlines():
-        pkg = pkg.decode('utf-8')
-        if pkg.startswith("icu"):
+        if pkg.startswith(b'icu'):
             for lib in subprocess.check_output(['pkg-config', '--libs-only-l', pkg.split()[0]]).split():
                 name = lib[2:]
                 if not name in locale_libs: