@@ -23,10 +23,11 @@ if "%1"=="" (
2323echo Building for %BUILD_BIT% -bit configuration...
2424
2525:: Define destination directory
26+ pushd " %~dp0 \.."
2627set ob_out_root = %CD% \local\scipy_openblas
2728set ob_64 = " %ob_out_root% 64"
2829set ob_32 = " %ob_out_root% 32"
29- if exist %ob_64% copy %ob_64% %ob_32%
30+ if exist %ob_64% xcopy %ob_64% %ob_32% /I /Y
3031set DEST_DIR = %ob_32%
3132
3233:: Clone OpenBLAS
@@ -43,8 +44,8 @@ if errorlevel 1 (
4344)
4445
4546:: Create build directory and navigate to it
46- if not exist build mkdir build
47- cd build
47+ if exist build (rmdir /S /Q build || exit /b 1)
48+ mkdir build || exit /b 1 & cd build || exit /b 1
4849
4950echo Setting up ARM64 Developer Command Prompt and running CMake...
5051
@@ -97,7 +98,7 @@ if exist openblasconfigversion.cmake copy /Y openblasconfigversion.cmake "%DEST_
9798:: Copy header files
9899echo Copying generated header files...
99100if exist generated xcopy /E /Y generated " %DEST_DIR% \include\"
100- if exist lapacke_mangling copy /Y lapacke_mangling " %DEST_DIR% \include\"
101+ if exist lapacke_mangling.h copy /Y lapacke_mangling.h " %DEST_DIR% \include\"
101102if exist openblas_config.h copy /Y openblas_config.h " %DEST_DIR% \include\"
102103
103104
@@ -111,6 +112,7 @@ cd ../..
111112
112113:: Build the Wheel & Install It
113114echo Running 'python -m build' to build the wheel...
115+ python -c " import build" 2 > NUL || pip install build
114116python -m build
115117if errorlevel 1 exit /b 1
116118
0 commit comments