@@ -12,20 +12,37 @@ REM of distutils (from late copies of CPython) that is enabled by default.
12
12
REM It breaks build for Windows, so use distutils from "stdlib" as before.
13
13
REM @TODO: remove the setting, once transition to build backend on Windows
14
14
REM to cmake is complete.
15
+ REM UPD: Seems to work fine with setuptools 69, so we need to set minimal
16
+ REM requirements before removing it.
15
17
SET " SETUPTOOLS_USE_DISTUTILS = stdlib"
16
18
17
19
set " CC = icx"
18
20
set " CXX = icx"
19
21
20
- set " SKBUILD_ARGS = -G Ninja --"
21
- set " SKBUILD_ARGS = %SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
22
+ set " CMAKE_GENERATOR = Ninja"
23
+ :: Make CMake verbose
24
+ set " VERBOSE = 1"
22
25
23
- %PYTHON% setup.py install --single-version-externally-managed --record=record.txt %SKBUILD_ARGS%
26
+ %PYTHON% -m build -w -n -x
27
+ if %ERRORLEVEL% neq 0 exit 1
24
28
25
- rem Build wheel package
29
+ :: `pip install dist\numpy*.whl` does not work on windows,
30
+ :: so use a loop; there's only one wheel in dist/ anyway
31
+ for /f %%f in ('dir /b /S .\dist') do (
32
+ %PYTHON% -m wheel tags --remove --build %GIT_DESCRIBE_NUMBER% %%f
33
+ if %ERRORLEVEL% neq 0 exit 1
34
+ )
35
+
36
+ :: wheel file was renamed
37
+ for /f %%f in ('dir /b /S .\dist') do (
38
+ %PYTHON% -m pip install %%f
39
+ if %ERRORLEVEL% neq 0 exit 1
40
+ )
41
+
42
+ :: Copy wheel package
26
43
if NOT " %WHEELS_OUTPUT_FOLDER% " == " " (
27
- %PYTHON% setup.py bdist_wheel --build-number %GIT_DESCRIBE_NUMBER% %SKBUILD_ARGS%
28
- if errorlevel 1 exit 1
29
- copy dist\numba_dpex*.whl %WHEELS_OUTPUT_FOLDER%
30
- if errorlevel 1 exit 1
44
+ for /f %%f in ('dir /b /S .\dist') do (
45
+ copy %%f %WHEELS_OUTPUT_FOLDER%
46
+ if %ERRORLEVEL% neq 0 exit 1
47
+ )
31
48
)
0 commit comments