Skip to content

Commit 7b3e89f

Browse files
Fixed test_cython_api
1 parent 1389a32 commit 7b3e89f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

dpctl/tests/setup_cython_api.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,23 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
import Cython.Build
1817
import setuptools
18+
from Cython.Build import build_ext
1919

2020
import dpctl
2121

22+
23+
class custom_build_ext(build_ext):
24+
def build_extensions(self):
25+
self.compiler.set_executable("compiler_so", "icpx -fsycl -fPIC")
26+
self.compiler.set_executable("compiler_cxx", "icpx -fsycl -fPIC")
27+
self.compiler.set_executable(
28+
"linker_so",
29+
"icpx -fsycl -shared -fpic -fsycl-device-code-split=per_kernel",
30+
)
31+
build_ext.build_extensions(self)
32+
33+
2234
ext = setuptools.Extension(
2335
"_cython_api",
2436
["_cython_api.pyx"],
@@ -27,8 +39,8 @@
2739
)
2840

2941
setuptools.setup(
30-
name="_cython_api",
42+
name="test_cython_api",
3143
version="0.0.0",
3244
ext_modules=[ext],
33-
cmdclass={"build_ext": Cython.Build.build_ext},
45+
cmdclass={"build_ext": custom_build_ext},
3446
)

0 commit comments

Comments
 (0)