limine: update to 8.6.0.
[void-pkg.git] / common / hooks / post-install / 12-rename-python3-c-bindings.sh
blobc16b69d0139f7971e86bfaf4f487b6bfb42deb36
1 # This hook executes the following tasks:
2 # - renames cpython binding files to not include the arch-specific extension suffix
4 hook() {
5 if [ ! -d ${PKGDESTDIR}/${py3_sitelib} ]; then
6 return 0
7 fi
9 find "${PKGDESTDIR}/${py3_sitelib}" -type f -executable -iname '*.cpython*.so' \
10 | while read -r file; do
11 filename="${file##*/}"
12 modulename="${filename%%.*}"
13 msg_warn "${pkgver}: renamed '${filename}' to '${modulename}.so'.\n"
14 mv ${file} ${file%/*}/${modulename}.so
15 done