@@ -118,28 +118,21 @@ if errorlevel 1 exit /b 1
118118
119119echo Build complete. Returning to Batch.
120120
121+ cd ../../local
121122if " %if_bits% " == " 32" (
122123 echo Rewrite to scipy_openblas32
123- cd ../..
124124 set out_pyproject = pyproject_64_32.toml
125125 powershell -Command " (Get-Content 'pyproject.toml') -replace 'openblas64', 'openblas32' | Set-Content !out_pyproject! "
126- cd local
127126 move scipy_openblas64 scipy_openblas32
128127 powershell -Command " (Get-Content 'scipy_openblas32\__main__.py') -replace 'openblas64', 'openblas32' | Out-File 'scipy_openblas32\__main__.py' -Encoding utf8"
129128 powershell -Command " (Get-Content 'scipy_openblas32\__init__.py') -replace 'openblas64', 'openblas32' | Out-File 'scipy_openblas32\__init__.py' -Encoding utf8"
130129 powershell -Command " (Get-Content 'scipy_openblas32\__init__.py') -replace 'openblas_get_config64_', 'openblas_get_config' | Out-File 'scipy_openblas32\__init__.py' -Encoding utf8"
131130 powershell -Command " (Get-Content 'scipy_openblas32\__init__.py') -replace 'cflags =.*', 'cflags = \" -DBLAS_SYMBOL_PREFIX=scipy_\" ' | Out-File 'local\scipy_openblas32\__init__.py' -Encoding utf8"
132- mkdir scipy_openblas32\lib\pkgconfig
133- python -c " import scipy_openblas32 as s; print(s.get_pkg_config(use_prefix=True))" > scipy_openblas32/lib/pkgconfig/scipy-openblas.pc
134- ) else (
135- cd local
136- mkdir scipy_openblas64\lib\pkgconfig
137- python -c " import scipy_openblas64 as s; print(s.get_pkg_config(use_prefix=True))" > scipy_openblas64/lib/pkgconfig/scipy-openblas.pc
138131)
139132
140133:: Prepare destination directory
141- cd OpenBLAS/build
142- echo Preparing destination directory at %DEST_DIR% ...
134+ cd ../ OpenBLAS/build
135+ echo Preparing destination directory at %DEST_DIR%
143136if not exist " %DEST_DIR% \lib\cmake\OpenBLAS" mkdir " %DEST_DIR% \lib\cmake\OpenBLAS"
144137if not exist " %DEST_DIR% \include" mkdir " %DEST_DIR% \include"
145138
@@ -175,9 +168,19 @@ if exist openblas_config.h copy /Y openblas_config.h "%DEST_DIR%\include\"
175168echo Copying LAPACKE header files...
176169xcopy /Y " ..\lapack-netlib\lapacke\include\*.h" " %DEST_DIR% \include\"
177170if errorlevel 1 exit /b 1
178-
171+
172+ :: Create pkgconfig scipy-openblas.pc
173+ cd ../../local
174+ if " %if_bits% " == " 32" (
175+ mkdir scipy_openblas32\lib\pkgconfig
176+ python -c " import scipy_openblas32 as s; print(s.get_pkg_config(use_prefix=True))" > scipy_openblas32/lib/pkgconfig/scipy-openblas.pc
177+ ) else (
178+ mkdir scipy_openblas64\lib\pkgconfig
179+ python -c " import scipy_openblas64 as s; print(s.get_pkg_config(use_prefix=True))" > scipy_openblas64/lib/pkgconfig/scipy-openblas.pc
180+ )
181+
179182:: Move back to the root directory
180- cd .. /..
183+ cd /..
181184
182185:: Build the Wheel & Install It
183186echo Running 'python -m build' to build the wheel...
0 commit comments