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

Commit

Permalink
sage.env.cython_aliases: Fix for systems without zlib pc
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jun 6, 2020
1 parent c536daa commit b1b3787
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,15 @@ def cython_aliases():
for lib in ['fflas-ffpack', 'givaro', 'gsl', 'linbox', 'Singular',
'libpng', 'gdlib', 'm4ri', 'zlib', 'cblas', 'lapack']:
var = lib.upper().replace("-", "") + "_"
aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split()
if lib == 'zlib':
aliases[var + "CFLAGS"] = ""
try:
pc = pkgconfig.parse('zlib')
except pkgconfig.PackageNotFoundError:
from collections import defaultdict
pc = defaultdict(list, {'libraries': ['z']})
else:
aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split()
pc = pkgconfig.parse(lib)
# INCDIR should be redundant because the -I options are also
# passed in CFLAGS
Expand Down

0 comments on commit b1b3787

Please sign in to comment.