File: cibw_before_build_win.sh

package info (click to toggle)
scikit-misc 0.3.1%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,144 kB
  • sloc: fortran: 2,220; ansic: 1,352; python: 870; sh: 271; makefile: 98; javascript: 60
file content (36 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
set -xe

PROJECT_DIR="$1"
PLATFORM=$(PYTHONPATH=tools python -c "import openblas_support; print(openblas_support.get_plat())")

printenv
# Update license
cat $PROJECT_DIR/tools/wheels/LICENSE_win32.txt >> $PROJECT_DIR/LICENSE.txt

# Install Openblas
PYTHONPATH=tools python -c "import openblas_support; openblas_support.make_init('skmisc')"
mkdir -p /c/opt/32/lib/pkgconfig
mkdir -p /c/opt/64/lib/pkgconfig

# delvewheel is the equivalent of delocate/auditwheel for windows.
python -m pip install delvewheel

# make the DLL available for tools/wheels/repair_windows.sh. If you change
# this location you need to alter that script.
mkdir -p /c/opt/openblas/openblas_dll
which strip

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)")

# The 32/64 bit Fortran wheels are currently coming from different locations.
if [[ $PLATFORM == 'win-32' ]]; then
  # 32-bit openBLAS
  # Download 32 bit openBLAS and put it into c/opt/32/lib
  unzip $target -d /c/opt/
  cp /c/opt/32/bin/*.dll /c/opt/openblas/openblas_dll
  # rm /c/opt/openblas/if_32/32/lib/*.dll.a
else
  # 64-bit openBLAS
  unzip $target -d /c/opt/
  cp /c/opt/64/bin/*.dll /c/opt/openblas/openblas_dll
fi