Skip to content

Commit 73a39c1

Browse files
Fixed AttributeError: cython_create_listing with some setuptools
1 parent 9f95522 commit 73a39c1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

examples/cython/use_dpctl_sycl/setup.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616

1717
import Cython.Build
1818
import setuptools
19-
import setuptools.command.build_ext
19+
from setuptools.command.build_ext import build_ext as build_ext_base
2020

2121
import 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+
4448
setuptools.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
)

0 commit comments

Comments
 (0)