| 1 | set -xe |
| 2 | |
| 3 | PROJECT_DIR="$1" |
| 4 | PLATFORM=$(PYTHONPATH=tools python -c "import openblas_support; print(openblas_support.get_plat())") |
| 5 | |
| 6 | printenv |
| 7 | # Update license |
| 8 | cat $PROJECT_DIR/tools/wheels/LICENSE_win32.txt >> $PROJECT_DIR/LICENSE.txt |
| 9 | |
| 10 | # Install Openblas |
| 11 | PYTHONPATH=tools python -c "import openblas_support; openblas_support.make_init('skmisc')" |
| 12 | mkdir -p /c/opt/32/lib/pkgconfig |
| 13 | mkdir -p /c/opt/64/lib/pkgconfig |
| 14 | |
| 15 | # delvewheel is the equivalent of delocate/auditwheel for windows. |
| 16 | python -m pip install delvewheel |
| 17 | |
| 18 | # make the DLL available for tools/wheels/repair_windows.sh. If you change |
| 19 | # this location you need to alter that script. |
| 20 | mkdir -p /c/opt/openblas/openblas_dll |
| 21 | which strip |
| 22 | |
| 23 | target=$(python -c "import tools.openblas_support as obs; plat=obs.get_plat(); ilp64=obs.get_ilp64(); target=f'openblas_{plat}.zip'; obs.download_openblas(target, plat, ilp64);print(target)") |
| 24 | |
| 25 | # The 32/64 bit Fortran wheels are currently coming from different locations. |
| 26 | if [[ $PLATFORM == 'win-32' ]]; then |
| 27 | # 32-bit openBLAS |
| 28 | # Download 32 bit openBLAS and put it into c/opt/32/lib |
| 29 | unzip $target -d /c/opt/ |
| 30 | cp /c/opt/32/bin/*.dll /c/opt/openblas/openblas_dll |
| 31 | # rm /c/opt/openblas/if_32/32/lib/*.dll.a |
| 32 | else |
| 33 | # 64-bit openBLAS |
| 34 | unzip $target -d /c/opt/ |
| 35 | cp /c/opt/64/bin/*.dll /c/opt/openblas/openblas_dll |
| 36 | fi |