Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit fb8f4e5

Browse files
committed
allow absent zlib.pc
1 parent f74f554 commit fb8f4e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/module_list.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
png_include_dirs = png_pc['include_dirs']
4040

4141
# zlib
42-
zlib_pc = pkgconfig.parse('zlib')
42+
try:
43+
zlib_pc = pkgconfig.parse('zlib')
44+
except pkgconfig.PackageNotFoundError:
45+
from collections import defaultdict
46+
zlib_pc = defaultdict(list, {'libraries': ['z']})
4347
zlib_libs = zlib_pc['libraries']
4448
zlib_library_dirs = zlib_pc['library_dirs']
4549
zlib_include_dirs = zlib_pc['include_dirs']

0 commit comments

Comments
 (0)