make-test-runtime: cope with Debian's Python 2.7 configuration

Signed-off-by: Simon McVittie <smcv@debian.org>
tingping/wmclass
Simon McVittie 2016-09-06 11:10:55 +01:00
parent 1769f8e8dc
commit 9f52d50448
1 changed files with 9 additions and 1 deletions

View File

@ -33,8 +33,16 @@ for i in $@; do
_sysconfigdata ; do
cp ${PYDIR}/$py.py ${DIR}/usr/lib/python2.7
done
# These might not exist, depending how Python was configured; and the
# part after ${so} might be "module" or ".x86_64-linux-gnu" or
# something else
for so in _locale strop ; do
cp ${PYDIR}/lib-dynload/${so}module.so ${DIR}/usr/lib/python2.7/lib-dynload
cp ${PYDIR}/lib-dynload/${so}*.so ${DIR}/usr/lib/python2.7/lib-dynload || :
done
for plat in $( cd ${PYDIR} && echo plat-* ); do
test -e ${PYDIR}/${plat} || continue
mkdir -p ${DIR}/usr/lib/python2.7/${plat}
cp ${PYDIR}/${plat}/*.py ${DIR}/usr/lib/python2.7/${plat}/
done
fi
done