11# coding: utf-8
22# /*##########################################################################
33#
4- # Copyright (c) 2016-2024 European Synchrotron Radiation Facility
4+ # Copyright (c) 2016-2025 European Synchrotron Radiation Facility
55#
66# Permission is hereby granted, free of charge, to any person obtaining a copy
77# of this software and associated documentation files (the "Software"), to deal
@@ -734,7 +734,8 @@ def get_lz4_clib(field=None):
734734 cflags = ['-O3' , '-ffast-math' , '-std=gnu99' ]
735735 cflags += ['/Ox' , '/fp:fast' ]
736736
737- lz4_dir = glob ('src/c-blosc2/internal-complibs/lz4*' )[0 ]
737+ folders = glob ('src/c-blosc2/internal-complibs/lz4*' )
738+ lz4_dir = folders [0 ] if folders else "src/no-folder"
738739
739740 config = dict (
740741 sources = glob (f'{ lz4_dir } /*.c' ),
@@ -815,7 +816,8 @@ def get_zlib_clib(field=None):
815816 cflags = ['-O3' , '-ffast-math' , '-std=gnu99' ]
816817 cflags += ['/Ox' , '/fp:fast' ]
817818
818- zlib_dir = glob ('src/c-blosc/internal-complibs/zlib*' )[0 ]
819+ folders = glob ('src/c-blosc/internal-complibs/zlib*' )
820+ zlib_dir = folders [0 ] if folders else "src/no-folder"
819821
820822 config = dict (
821823 sources = glob (f'{ zlib_dir } /*.c' ),
@@ -833,7 +835,8 @@ def get_zstd_clib(field=None):
833835 cflags = ['-O3' , '-ffast-math' , '-std=gnu99' ]
834836 cflags += ['/Ox' , '/fp:fast' ]
835837
836- zstd_dir = glob ('src/c-blosc2/internal-complibs/zstd*' )[0 ]
838+ folders = glob ('src/c-blosc2/internal-complibs/zstd*' )
839+ zstd_dir = folders [0 ] if folders else "src/no-folder"
837840
838841 config = dict (
839842 sources = glob (f'{ zstd_dir } /*/*.c' ),
0 commit comments