File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 14
14
# See the License for the specific language governing permissions and
15
15
# limitations under the License.
16
16
17
- import Cython .Build
18
17
import setuptools
18
+ from Cython .Build import build_ext
19
19
20
20
import dpctl
21
21
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
+
22
34
ext = setuptools .Extension (
23
35
"_cython_api" ,
24
36
["_cython_api.pyx" ],
27
39
)
28
40
29
41
setuptools .setup (
30
- name = "_cython_api " ,
42
+ name = "test_cython_api " ,
31
43
version = "0.0.0" ,
32
44
ext_modules = [ext ],
33
- cmdclass = {"build_ext" : Cython . Build . build_ext },
45
+ cmdclass = {"build_ext" : custom_build_ext },
34
46
)
You can’t perform that action at this time.
0 commit comments