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 16
16
17
17
import Cython .Build
18
18
import setuptools
19
- import setuptools .command .build_ext
19
+ from setuptools .command .build_ext import build_ext as build_ext_base
20
20
21
21
import dpctl
22
22
23
23
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 ):
27
25
def build_extensions (self ):
28
26
self .compiler .set_executable ("compiler_so" , "icx -fsycl -fPIC" )
29
27
self .compiler .set_executable ("compiler_cxx" , "icpx -fsycl -fPIC" )
@@ -41,9 +39,15 @@ def build_extensions(self):
41
39
language = "c++" ,
42
40
)
43
41
42
+ (cythonized_ext ,) = Cython .Build .cythonize (
43
+ [
44
+ ext ,
45
+ ]
46
+ )
47
+
44
48
setuptools .setup (
45
49
name = "use_dpctl_sycl" ,
46
50
version = "0.0.0" ,
47
- ext_modules = [ext ],
51
+ ext_modules = [cythonized_ext ],
48
52
cmdclass = {"build_ext" : custom_build_ext },
49
53
)
You can’t perform that action at this time.
0 commit comments