aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-pexpect
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-pexpect')
-rw-r--r--testing/py-pexpect/APKBUILD42
1 files changed, 34 insertions, 8 deletions
diff --git a/testing/py-pexpect/APKBUILD b/testing/py-pexpect/APKBUILD
index f1606dce19..2bd1cd1002 100644
--- a/testing/py-pexpect/APKBUILD
+++ b/testing/py-pexpect/APKBUILD
@@ -2,29 +2,55 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-pexpect
_pkgname=${pkgname#py-}
-pkgver=4.1.0
+pkgver=4.2
pkgrel=0
pkgdesc="Make Python a better tool for controlling and automating other programs"
url="http://pexpect.readthedocs.org/en/stable"
arch="noarch"
license="MIT"
-depends="python py-ptyprocess"
-makedepends="python-dev"
-subpackages="$pkgname-doc"
+depends=""
+makedepends="python-dev python3-dev py-setuptools"
+subpackages="$pkgname-doc py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/pexpect/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
cd "$builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ python setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
-md5sums="049f3c98f4b0b7426e6b5d8a01566786 py-pexpect-4.1.0.tar.gz"
-sha256sums="be665e01713acc296014a9883bc1ab12232424053ae884a317864b0e8ece6f93 py-pexpect-4.1.0.tar.gz"
-sha512sums="eecd0a4d621e9c14249922bfc36efb8e89c527625d2e2f4fdc0053911f3666e5de7608ce08e023a4020a6baefadbd4643fe32b9e8c34d961296c6b388a2cc2d5 py-pexpect-4.1.0.tar.gz"
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
+
+ mkdir -p "$subpkgdir"${dir}
+ mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
+}
+
+_py2() {
+ _py python2
+ depends="py-ptyprocess"
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+ depends="py3-ptyprocess"
+}
+
+
+
+md5sums="edd8fa352da64a02fd8aade4994cc8c6 py-pexpect-4.2.tar.gz"
+sha256sums="866369f3fb8b539820ba198db07c0a18fecb01d7380c01086c12928ed76ef94e py-pexpect-4.2.tar.gz"
+sha512sums="df7155d4f57cfcb17514268fa7d6c010a99b1d9dec46a7bc51bb80446cbbe30187be6bf2a57ec192394b0ce61b6beb40510fd148ffdb7e12c37230536d7b4540 py-pexpect-4.2.tar.gz"