diff options
Diffstat (limited to 'extra/python2')
-rw-r--r-- | extra/python2/PKGBUILD | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/extra/python2/PKGBUILD b/extra/python2/PKGBUILD index eedc2a87d..ea8cf6be4 100644 --- a/extra/python2/PKGBUILD +++ b/extra/python2/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 173846 2012-12-25 00:34:35Z foutrelis $ +# $Id: PKGBUILD 182151 2013-04-08 10:27:26Z stephane $ # Maintainer: Stéphane Gaudreault <stephane@archlinux.org> # Contributer: Allan McRae <allan@archlinux.org> # Contributer: Jason Chu <jason@archlinux.org> pkgname=python2 -pkgver=2.7.3 -pkgrel=4 +pkgver=2.7.4 +pkgrel=1 _pybasever=2.7 pkgdesc="A high-level scripting language" arch=('i686' 'x86_64') @@ -17,7 +17,7 @@ optdepends=('tk: for IDLE') conflicts=('python<3') options=('!makeflags') source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz) -sha1sums=('b2b0ada7ebed4a8204a855193afbdb3aa3308357') +sha1sums=('08e78ebeb6d9c799644f6d787ca424291c0fe03e') build() { cd "${srcdir}/Python-${pkgver}" @@ -32,6 +32,9 @@ build() { # FS#23997 sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py + sed -i "s/python2.3/python2/g" Lib/distutils/tests/test_build_scripts.py \ + Lib/distutils/tests/test_install_scripts.py Tools/scripts/gprof2html.py + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), # rather than copies shipped in the tarball rm -r Modules/expat @@ -50,21 +53,23 @@ package() { cd "${srcdir}/Python-${pkgver}" make DESTDIR="${pkgdir}" altinstall maninstall - ln -sf python${_pybasever} "${pkgdir}/usr/bin/python2" - ln -sf python${_pybasever}-config "${pkgdir}/usr/bin/python2-config" - ln -sf python${_pybasever}.1 "${pkgdir}/usr/share/man/man1/python2.1" + rm "${pkgdir}"/usr/share/man/man1/python.1 + + ln -sf python${_pybasever} "${pkgdir}"/usr/bin/python2 + ln -sf python${_pybasever}-config "${pkgdir}"/usr/bin/python2-config + ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python2.1 + + # FS#33954 + ln -sf python-${_pybasever}.pc "${pkgdir}"/usr/lib/pkgconfig/python2.pc - ln -sf ../../libpython${_pybasever}.so \ - "${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so" + ln -sf ../../libpython${_pybasever}.so "${pkgdir}"/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so - mv "${pkgdir}/usr/bin/smtpd.py" "${pkgdir}/usr/lib/python${_pybasever}/" + mv "${pkgdir}"/usr/bin/smtpd.py "${pkgdir}"/usr/lib/python${_pybasever}/ # some useful "stuff" install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts} - install -m755 Tools/i18n/{msgfmt,pygettext}.py \ - "${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/" - install -m755 Tools/scripts/{README,*py} \ - "${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/" + install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/python${_pybasever}/Tools/i18n/ + install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/python${_pybasever}/Tools/scripts/ # fix conflicts with python mv "${pkgdir}"/usr/bin/idle{,2} @@ -72,13 +77,12 @@ package() { mv "${pkgdir}"/usr/bin/2to3{,-2.7} # clean up #!s - find "${pkgdir}/usr/lib/python${_pybasever}/" -name '*.py' | \ + 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" + sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}"/usr/lib/python${_pybasever}/config/Makefile # license - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } |