@@ -327,6 +327,10 @@ def do_cythonize(extensions):
327
327
328
328
329
329
static_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 ]
330
334
sources_list = [
331
335
# private
332
336
(["cuda/bindings/_bindings/cydriver.pyx" , "cuda/bindings/_bindings/loader.cpp" ], None ),
@@ -338,22 +342,13 @@ def do_cythonize(extensions):
338
342
(["cuda/bindings/_lib/cyruntime/cyruntime.pyx" ], None ),
339
343
(["cuda/bindings/_lib/cyruntime/utils.pyx" ], None ),
340
344
# public
341
- ([ "cuda/bindings/*.pyx" ] , None ),
345
+ (cuda_bindings_files , None ),
342
346
# public (deprecated, to be removed)
343
347
(["cuda/*.pyx" ], None ),
344
348
# internal files used by generated bindings
345
349
(["cuda/bindings/_internal/utils.pyx" ], None ),
346
350
* (([f ], None ) for f in dst_files if f .endswith (".pyx" )),
347
351
]
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
357
352
358
353
for sources , libraries in sources_list :
359
354
extensions += prep_extensions (sources , libraries )
0 commit comments