build-style/python-module: rename unversioned scripts, if any
- No more name conflicts in case of multi-version python packages - No more manual renaming - No more manual shebang fixes - Alternatives support ok xtraeme@
This commit is contained in:
parent
f6be81e3b7
commit
ffff9d749d
1 changed files with 10 additions and 0 deletions
|
@ -49,5 +49,15 @@ do_install() {
|
||||||
python${pyver} setup.py build --build-base=build-${pyver} \
|
python${pyver} setup.py build --build-base=build-${pyver} \
|
||||||
install --prefix=/usr --root=${DESTDIR} ${make_install_args}
|
install --prefix=/usr --root=${DESTDIR} ${make_install_args}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Rename unversioned scripts to avoid name conflicts.
|
||||||
|
if [ "$python_versions" != "2.7" -a "$python_versions" != "${python_versions#2.7}" ]; then
|
||||||
|
if [ -d ${DESTDIR}/usr/bin ]; then
|
||||||
|
find ${DESTDIR}/usr/bin -type f ! -name "*[[:digit:]]\.[[:digit:]]" | while IFS= read -r f _; do
|
||||||
|
mv "${f}" "${f}${pyver}"
|
||||||
|
echo "[python-module] Unversioned script renamed to '${f#$DESTDIR}${pyver}'"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue