11REM A workaround for activate-dpcpp.bat issue to be addressed in 2021.4
2- SET " LIB = %BUILD_PREFIX% \Library\lib;%BUILD_PREFIX% \compiler\lib;%LIB% "
3- SET " INCLUDE = %BUILD_PREFIX% \include;%INCLUDE% "
2+ set " LIB = %BUILD_PREFIX% \Library\lib;%BUILD_PREFIX% \compiler\lib;%LIB% "
3+ set " INCLUDE = %BUILD_PREFIX% \include;%INCLUDE% "
44
55" %PYTHON% " setup.py clean --all
66
77set " MKLROOT = %PREFIX% /Library"
88set " TBB_ROOT_HINT = %PREFIX% /Library"
99set " DPL_ROOT_HINT = %PREFIX% /Library"
1010
11- set " SKBUILD_ARGS = -G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
12- set " SKBUILD_ARGS = %SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
13-
1411REM Overriding IPO is useful for building in resources constrained VMs (public CI)
1512if DEFINED OVERRIDE_INTEL_IPO (
16- set " SKBUILD_ARGS = %SKBUILD_ARGS % -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
13+ set " CMAKE_ARGS = %CMAKE_ARGS % -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
1714)
1815
19- FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19) DO @ (
16+ FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21 ) DO @ (
2017 REM set DIR_HINT if directory exists
2118 IF EXIST " %BUILD_PREFIX% \Library\lib\clang\%%V \" (
22- SET " SYCL_INCLUDE_DIR_HINT = %BUILD_PREFIX% \Library\lib\clang\%%V "
19+ set " SYCL_INCLUDE_DIR_HINT = %BUILD_PREFIX% \Library\lib\clang\%%V "
2320 )
2421)
2522
@@ -37,21 +34,37 @@ if EXIST "%PLATFORM_DIR%" (
3734 if errorlevel 1 exit 1
3835)
3936
40- if NOT " %WHEELS_OUTPUT_FOLDER% " == " " (
41- rem Install and assemble wheel package from the build bits
42- " %PYTHON% " setup.py install bdist_wheel %SKBUILD_ARGS%
43- if errorlevel 1 exit 1
44- copy dist\dpnp*.whl %WHEELS_OUTPUT_FOLDER%
45- if errorlevel 1 exit 1
46- ) ELSE (
47- rem Only install
48- " %PYTHON% " setup.py install %SKBUILD_ARGS%
49- if errorlevel 1 exit 1
37+ set " CC = icx"
38+ set " CXX = icx"
39+
40+ set " CMAKE_GENERATOR = Ninja"
41+ :: Make CMake verbose
42+ set " VERBOSE = 1"
43+
44+ %PYTHON% -m build -w -n -x
45+ if %ERRORLEVEL% neq 0 exit 1
46+
47+ :: `pip install dist\numpy*.whl` does not work on windows,
48+ :: so use a loop; there's only one wheel in dist/ anyway
49+ for /f %%f in ('dir /b /S .\dist') do (
50+ %PYTHON% -m wheel tags --remove --build %GIT_DESCRIBE_NUMBER% %%f
51+ if %ERRORLEVEL% neq 0 exit 1
5052)
5153
52- rem copy back
53- if EXIST " %PLATFORM_DIR% " (
54- rem copy back
55- copy /Y " %FN% " " %PLATFORM_DIR% \%FN% "
56- if errorlevel 1 exit 1
54+ :: wheel file was renamed
55+ for /f %%f in ('dir /b /S .\dist') do (
56+ %PYTHON% -m pip install %%f ^
57+ --no-build-isolation ^
58+ --no-deps ^
59+ --only-binary :all: ^
60+ --no-index ^
61+ --prefix %PREFIX% ^
62+ -vv
63+ if %ERRORLEVEL% neq 0 exit 1
64+ )
65+
66+ :: Copy wheel package
67+ if NOT " %WHEELS_OUTPUT_FOLDER% " == " " (
68+ copy dist\dpnp*.whl %WHEELS_OUTPUT_FOLDER%
69+ if %ERRORLEVEL% neq 0 exit 1
5770)
0 commit comments