File: build-wheels-linux.sh

package info (click to toggle)
python-laszip 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 176 kB
  • sloc: cpp: 906; sh: 50; makefile: 4; python: 1
file content (40 lines) | stat: -rw-r--r-- 938 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
37
38
39
40
set -e

function install_laszip() {
  version="$1"
  git clone -b "$version" https://github.com/laszip/laszip
  mkdir laszip-build
  cmake -B laszip-build -DCMAKE_BUILD_TYPE=Release laszip
  cmake --build laszip-build
  cmake --install laszip-build
}

function compile_wheels() {
  for PYBIN in /opt/python/*/bin; do
    is_greater_or_eq_than_3_7=$("${PYBIN}/python" -c 'import sys;v = sys.version_info;print(v.major == 3 and v.minor >= 7)')
    if [[ "$is_greater_or_eq_than_3_7" == "True" ]]; then
        "${PYBIN}/pip" wheel --no-deps . -w wheelhouse
    fi
  done
}

function repair_wheel() {
  wheel="$1"
  if ! auditwheel show "$wheel"; then
    echo "Skipping non-platform wheel $wheel"
  else
    auditwheel repair "$wheel" --plat "$PLAT" -w wheelhouse
  fi
}

function repair_wheels() {
  for wheel in wheelhouse/*.whl; do
    repair_wheel "$wheel"
  done
}

install_laszip 3.4.3

cd /laszip-python
compile_wheels
repair_wheels