diff --git a/PKGBUILD b/PKGBUILD index 3d66fb8..ede4af5 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ pkgname=python2 pkgver=2.7.5 -pkgrel=2 +pkgrel=3 _pybasever=2.7 pkgdesc="A high-level scripting language" arch=('i686' 'x86_64') @@ -45,6 +45,13 @@ prepare() { rm -r Modules/expat rm -r Modules/zlib rm -r Modules/_ctypes/{darwin,libffi}* + + # clean up #!s + find . -name '*.py' | \ + xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" + + # Workaround asdl_c.py error + touch Include/Python-ast.h Python/Python-ast.c } build() { @@ -85,10 +92,6 @@ package() { mv "${pkgdir}"/usr/bin/pydoc{,2} mv "${pkgdir}"/usr/bin/2to3{,-2.7} - # clean up #!s - find "${pkgdir}"/usr/lib/python${_pybasever}/ -name '*.py' | \ - xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" - # clean-up reference to build directory sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}"/usr/lib/python${_pybasever}/config/Makefile