File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,14 @@ def _make_extensions(config):
73
73
74
74
settings = COMPILER_SETTINGS .copy ()
75
75
76
- if pkgconfig .exists ('hdf5' ):
77
- pkgcfg = pkgconfig .parse ("hdf5" )
78
- settings ['include_dirs' ].extend (pkgcfg ['include_dirs' ])
79
- settings ['library_dirs' ].extend (pkgcfg ['library_dirs' ])
80
- settings ['define_macros' ].extend (pkgcfg ['define_macros' ])
76
+ try :
77
+ if pkgconfig .exists ('hdf5' ):
78
+ pkgcfg = pkgconfig .parse ("hdf5" )
79
+ settings ['include_dirs' ].extend (pkgcfg ['include_dirs' ])
80
+ settings ['library_dirs' ].extend (pkgcfg ['library_dirs' ])
81
+ settings ['define_macros' ].extend (pkgcfg ['define_macros' ])
82
+ except EnvironmentError :
83
+ pass
81
84
82
85
settings ['include_dirs' ] += [numpy .get_include ()]
83
86
if config .mpi :
Original file line number Diff line number Diff line change @@ -202,8 +202,11 @@ def autodetect_version(hdf5_dir=None):
202
202
regexp = re .compile (r'^libhdf5.so' )
203
203
204
204
libdirs = ['/usr/local/lib' , '/opt/local/lib' ]
205
- if pkgconfig .exists ("hdf5" ):
206
- libdirs .append (pkgconfig .parse ("hdf5" )['library_dirs' ])
205
+ try :
206
+ if pkgconfig .exists ("hdf5" ):
207
+ libdirs .append (pkgconfig .parse ("hdf5" )['library_dirs' ])
208
+ except EnvironmentError :
209
+ pass
207
210
if hdf5_dir is not None :
208
211
libdirs .insert (0 , op .join (hdf5_dir , 'lib' ))
209
212
You can’t perform that action at this time.
0 commit comments