diff --git a/srcpkgs/python/template b/srcpkgs/python/template index d6ff157f6df..5aa2d482227 100644 --- a/srcpkgs/python/template +++ b/srcpkgs/python/template @@ -4,7 +4,7 @@ # pkgname=python version=2.7.8 -revision=5 +revision=6 wrksrc="Python-${version}" hostmakedepends="pkg-config" makedepends=" @@ -71,6 +71,12 @@ post_install() { # Remove test module and tests that fail to be byte-compiled. rm -r ${DESTDIR}/usr/lib/python2.7/test rm -r ${DESTDIR}/usr/lib/python2.7/lib2to3/tests + if [ "$CROSS_BUILD" ]; then + # Remove references to cross toolchain. + sed -i "s/$XBPS_CROSS_TRIPLET-//g" \ + ${DESTDIR}/usr/lib/python${version%.*}/_sysconfigdata.py \ + ${DESTDIR}/usr/lib/python${version%.*}/config/Makefile + fi } python-devel_package() {