File: post-build.sh

package info (click to toggle)
metview 5.26.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 614,288 kB
  • sloc: cpp: 560,215; ansic: 44,633; xml: 19,933; f90: 17,905; sh: 7,269; python: 5,565; yacc: 2,318; lex: 1,372; perl: 701; makefile: 87
file content (24 lines) | stat: -rwxr-xr-x 680 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -euo pipefail

# NOTE in case of problems like we had with eccodes, replace with noop here
if [ "$(uname)" != "Darwin" ] ; then
    rm -rf /tmp/eckit/auditwheel
    auditwheel repair -w /tmp/eckit/auditwheel /tmp/eckit/build/wheel/*whl
    cd /tmp/eckit/auditwheel
    F=$(ls *whl)
    unzip $F
    patchelf --add-rpath '$ORIGIN' eckitlib.libs/*
    rm $F
    zip -r $F ./*
    rm /tmp/eckit/build/wheel/*
    mv /tmp/eckit/auditwheel/$F /tmp/eckit/build/wheel
    cd -
fi

# NOTE on macos we delocate with impunity, because the findlibs recursive depload
# is disabled anyway
if [ "$(uname)" = "Darwin" ] ; then
    delocate-wheel /tmp/eckit/build/wheel/*whl
fi