Skip to content

Commit 6db66ce

Browse files
committed
Edits from @Harishmcw review.
1 parent 4519ac1 commit 6db66ce

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/build_steps_win_arm64.bat

100644100755
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ if "%1"=="" (
2323
echo Building for %BUILD_BIT%-bit configuration...
2424

2525
:: Define destination directory
26+
pushd "%~dp0\.."
2627
set ob_out_root=%CD%\local\scipy_openblas
2728
set ob_64="%ob_out_root%64"
2829
set 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
3031
set 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

4950
echo 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
9899
echo Copying generated header files...
99100
if 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\"
101102
if 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
113114
echo Running 'python -m build' to build the wheel...
115+
python -c "import build" 2>NUL || pip install build
114116
python -m build
115117
if errorlevel 1 exit /b 1
116118

0 commit comments

Comments
 (0)