mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
17bb03e88f
added new checkdeps
48 lines
1.6 KiB
Bash
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')
|
|
}
|
|
|