@@ -420,9 +420,15 @@ def cython_aliases():
420
420
pc = defaultdict (list , {'libraries' : ['z' ]})
421
421
libs = "-lz"
422
422
else :
423
- aliases [var + "CFLAGS" ] = pkgconfig .cflags (lib ).split ()
424
- pc = pkgconfig .parse (lib )
425
- libs = pkgconfig .libs (lib )
423
+ try :
424
+ aliases [var + "CFLAGS" ] = pkgconfig .cflags (lib ).split ()
425
+ pc = pkgconfig .parse (lib )
426
+ libs = pkgconfig .libs (lib )
427
+ except pkgconfig .PackageNotFoundError :
428
+ from distutils import log
429
+ log .warn ('Package {0} not installed' .format (lib ))
430
+ continue
431
+
426
432
# It may seem that INCDIR is redundant because the -I options are also
427
433
# passed in CFLAGS. However, "extra_compile_args" are put at the end
428
434
# of the compiler command line. "include_dirs" go to the front; the
@@ -454,7 +460,9 @@ def uname_specific(name, value, alternative):
454
460
# file (possibly because of confusion between CFLAGS and CXXFLAGS?).
455
461
# This is not a problem in practice since LinBox depends on
456
462
# fflas-ffpack and fflas-ffpack does add such a C++11 flag.
457
- aliases ["LINBOX_CFLAGS" ].append ("-std=gnu++11" )
463
+ if "LINBOX_CFLAGS" in aliases :
464
+ aliases ["LINBOX_CFLAGS" ].append ("-std=gnu++11" )
465
+
458
466
aliases ["ARB_LIBRARY" ] = ARB_LIBRARY
459
467
460
468
# TODO: Remove Cygwin hack by installing a suitable cblas.pc
@@ -463,7 +471,7 @@ def uname_specific(name, value, alternative):
463
471
464
472
try :
465
473
aliases ["M4RI_CFLAGS" ].remove ("-pedantic" )
466
- except ValueError :
474
+ except ( ValueError , KeyError ) :
467
475
pass
468
476
469
477
# Determine ecl-specific compiler arguments using the ecl-config script
0 commit comments