@@ -418,13 +418,17 @@ def parse_hook_fontconfig_add_fonts(ec, eprefix):
418418
419419def parse_hook_grpcio_zlib (ec , ecprefix ):
420420 """Adjust preinstallopts to use ZLIB from compat layer."""
421- if ec .name == 'grpcio' and ec .version in ['1.57.0' ]:
422- exts_list = ec ['exts_list' ]
423- original_preinstallopts = (exts_list [0 ][2 ])['preinstallopts' ]
424- original_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True"
425- new_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False"
426- (exts_list [0 ][2 ])['preinstallopts' ] = original_preinstallopts .replace (original_option , new_option , 1 )
427- print_msg ("Modified the easyconfig to use compat ZLIB with GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False" )
421+ if ec .name == 'grpcio' :
422+ target_list = ['1.57.0' , '1.67.1' , '1.70.0' ]
423+ if ec .version in target_list :
424+ exts_list = ec ['exts_list' ]
425+ original_preinstallopts = (exts_list [0 ][2 ])['preinstallopts' ]
426+ original_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True"
427+ new_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False"
428+ (exts_list [0 ][2 ])['preinstallopts' ] = original_preinstallopts .replace (original_option , new_option , 1 )
429+ print_msg ("Modified the easyconfig to use compat ZLIB with GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False" )
430+ else :
431+ print_warning ("%s version %s not in target list %s, not applying hook" , ec .name , ec .version , target_list )
428432 else :
429433 raise EasyBuildError ("grpcio-specific hook triggered for a non-grpcio easyconfig?!" )
430434
0 commit comments