File: delocate-wheel.sh

package info (click to toggle)
python-laszip 0.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: cpp: 906; sh: 53; makefile: 5; python: 1
file content (26 lines) | stat: -rw-r--r-- 513 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
25
26
#!/bin/sh
set -e

# Taken from
# https://github.com/matthew-brett/delocate/issues/72#issuecomment-623070388

package_name="laszip"

origindir=$(pwd)
whl_path="$origindir/$(ls dist/*.whl | head -1)"
echo "The wheel is $whl_path"
delocate-listdeps --depending "$whl_path"

cd $(mktemp -d)
unzip "$whl_path"
delocate-path -L "$package_name".dylibs .
wheel=$(basename "$whl_path")
zip -r "$wheel" *
mv "$wheel" "$whl_path"
tempdir=$(pwd)

cd "$origindir"

rm -rf "$tempdir"

delocate-listdeps --depending "$whl_path"