@@ -327,6 +327,10 @@ def do_cythonize(extensions):
327327
328328
329329static_runtime_libraries = ["cudart_static" , "rt" ] if sys .platform == "linux" else ["cudart_static" ]
330+ cuda_bindings_files = glob .glob ("cuda/bindings/*.pyx" )
331+ if sys .platform == "win32" :
332+ # cuFILE does not support Windows
333+ cuda_bindings_files = [f for f in cuda_bindings_files if "cufile" not in f ]
330334sources_list = [
331335 # private
332336 (["cuda/bindings/_bindings/cydriver.pyx" , "cuda/bindings/_bindings/loader.cpp" ], None ),
@@ -338,22 +342,13 @@ def do_cythonize(extensions):
338342 (["cuda/bindings/_lib/cyruntime/cyruntime.pyx" ], None ),
339343 (["cuda/bindings/_lib/cyruntime/utils.pyx" ], None ),
340344 # public
341- ([ "cuda/bindings/*.pyx" ] , None ),
345+ (cuda_bindings_files , None ),
342346 # public (deprecated, to be removed)
343347 (["cuda/*.pyx" ], None ),
344348 # internal files used by generated bindings
345349 (["cuda/bindings/_internal/utils.pyx" ], None ),
346350 * (([f ], None ) for f in dst_files if f .endswith (".pyx" )),
347351]
348- if sys .platform == "win32" :
349- # cuFILE does not support Windows
350- new_sources_list = []
351- for source in sources_list :
352- file_list , _ = source
353- if all ("cufile" not in f for f in file_list ):
354- new_sources_list .append (source )
355- assert len (new_sources_list ) == len (sources_list ) - 3 , f"{ new_sources_list = } , { sources_list = } "
356- sources_list = new_sources_list
357352
358353for sources , libraries in sources_list :
359354 extensions += prep_extensions (sources , libraries )
0 commit comments