aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/py-ws4py/APKBUILD (renamed from testing/py-ws4py/APKBUILD)21
1 files changed, 10 insertions, 11 deletions
diff --git a/testing/py-ws4py/APKBUILD b/community/py-ws4py/APKBUILD
index 268d25ef69..097baed84b 100644
--- a/testing/py-ws4py/APKBUILD
+++ b/community/py-ws4py/APKBUILD
@@ -3,13 +3,13 @@
pkgname=py-ws4py
_pkgname=ws4py
pkgver=0.3.5
-pkgrel=0
+pkgrel=1
pkgdesc="WebSocket client and server library for Python 2 and 3 as well as PyPy"
url="https://github.com/Lawouach/WebSocket-for-Python"
arch="noarch"
license="BSD"
depends=""
-makedepends="python-dev python3-dev"
+makedepends="python2-dev python3-dev"
install=""
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
@@ -17,28 +17,27 @@ builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
- python setup.py build || return 1
+ python2 setup.py build || return 1
python3 setup.py build || return 1
}
+
package() {
- cd "$builddir"
- python setup.py install --root=$pkgdir/ --optimize=1 || return 1
- python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ mkdir -p "$pkgdir"
}
_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}
+ arch="noarch"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
_py2() {
_py python2
+ replaces="$pkgname"
}
_py3() {