desktop/python-pexpect/PKGBUILD
AlmAck 17bb03e88f python-pytest 3.2.3
added new checkdeps
2017-10-22 14:42:58 +02:00

48 lines
1.6 KiB
Bash

pkgbase=python-pexpect
pkgname=('python2-pexpect' 'python3-pexpect')
pkgver=4.2.1
pkgrel=1
pkgdesc='Python module for spawning and controlling other applications'
arch=('any')
url='http://pexpect.sourceforge.net/'
license=('MIT')
makedepends=('python2' 'python3')
source=("https://pypi.python.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-$pkgver.tar.gz#md5=3694410001a99dff83f0b500a1ca1c95")
sha256sums=('3d132465a75b57aa818341c6521392a06cc660feb3988d7f1074f39bd23c9a92')
prepare() {
cp -r ${srcdir}/pexpect-$pkgver ${srcdir}/python2-pexpect-$pkgver
}
package_python3-pexpect() {
depends=('python3' 'python3-ptyprocess')
cd ${srcdir}/pexpect-$pkgver
python3 setup.py install --root=${pkgdir}
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python3|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python3|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python3|" \
$(find ${pkgdir} -name '*.py')
}
package_python2-pexpect() {
depends=('python2' 'python2-ptyprocess')
conflicts=('python-pexpect')
replaces=('python-pexpect')
provides=('python-pexpect')
cd ${srcdir}/python2-pexpect-$pkgver
python2 setup.py install --root=${pkgdir}
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
$(find ${pkgdir} -name '*.py')
}