Skip to content

Commit 4337ce5

Browse files
committed
Move pyproject file out and back
1 parent 96da14b commit 4337ce5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/build_steps_win_arm64.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ echo Build complete. Returning to Batch.
6666
:: Rewrite the name of the project to scipy-openblas32
6767
echo Rewrite to scipy_openblas32
6868
cd ../..
69-
powershell -Command "(Get-Content 'pyproject.toml') -replace 'openblas64', 'openblas32' | Set-Content 'pyproject.toml'"
69+
set out_pyproject=pyproject_64_32.toml
70+
powershell -Command "(Get-Content 'pyproject.toml') -replace 'openblas64', 'openblas32' | Set-Content %out_pyproject%
7071
powershell -Command "(Get-Content 'local\scipy_openblas32\__main__.py') -replace 'openblas64', 'openblas32' | Out-File 'local\scipy_openblas32\__main__.py' -Encoding utf8"
7172
powershell -Command "(Get-Content 'local\scipy_openblas32\__init__.py') -replace 'openblas64', 'openblas32' | Out-File 'local\scipy_openblas32\__init__.py' -Encoding utf8"
7273
powershell -Command "(Get-Content 'local\scipy_openblas32\__init__.py') -replace 'openblas_get_config64_', 'openblas_get_config' | Out-File 'local\scipy_openblas32\__init__.py' -Encoding utf8"
@@ -113,9 +114,12 @@ cd ../..
113114
:: Build the Wheel & Install It
114115
echo Running 'python -m build' to build the wheel...
115116
python -c "import build" 2>NUL || pip install build
117+
move /Y pyproject.toml pyproject.toml.bak
118+
move /Y %out_pyproject% pyproject.toml
116119
python -m build
117120
if errorlevel 1 exit /b 1
118-
121+
move /Y pyproject.toml.bak pyproject.toml
122+
119123
:: Locate the built wheel
120124
for /f %%f in ('dir /b dist\scipy_openblas*.whl 2^>nul') do set WHEEL_FILE=dist\%%f
121125

0 commit comments

Comments
 (0)