void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

12-rename-python3-c-bindings.sh (485B)


      1# This hook executes the following tasks:
      2#	- renames cpython binding files to not include the arch-specific extension suffix
      3
      4hook() {
      5	if [ ! -d ${PKGDESTDIR}/${py3_sitelib} ]; then
      6		return 0
      7	fi
      8
      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
     16}