File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
examples/cython/use_dpctl_sycl Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1616
1717import Cython .Build
1818import setuptools
19- import setuptools .command .build_ext
19+ from setuptools .command .build_ext import build_ext as build_ext_base
2020
2121import dpctl
2222
2323
24- class custom_build_ext (
25- setuptools .command .build_ext .build_ext , Cython .Build .build_ext
26- ):
24+ class custom_build_ext (build_ext_base ):
2725 def build_extensions (self ):
2826 self .compiler .set_executable ("compiler_so" , "icx -fsycl -fPIC" )
2927 self .compiler .set_executable ("compiler_cxx" , "icpx -fsycl -fPIC" )
@@ -41,9 +39,15 @@ def build_extensions(self):
4139 language = "c++" ,
4240)
4341
42+ (cythonized_ext ,) = Cython .Build .cythonize (
43+ [
44+ ext ,
45+ ]
46+ )
47+
4448setuptools .setup (
4549 name = "use_dpctl_sycl" ,
4650 version = "0.0.0" ,
47- ext_modules = [ext ],
51+ ext_modules = [cythonized_ext ],
4852 cmdclass = {"build_ext" : custom_build_ext },
4953)
You can’t perform that action at this time.
0 commit comments