diff options
Diffstat (limited to 'community/py3-ws4py')
-rw-r--r-- | community/py3-ws4py/APKBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py3-ws4py/APKBUILD b/community/py3-ws4py/APKBUILD new file mode 100644 index 0000000000..7cf69cdfb0 --- /dev/null +++ b/community/py3-ws4py/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-ws4py +_pkgname=ws4py +pkgver=0.5.1 +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="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" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build || return 1 + python3 setup.py build || return 1 +} + + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 +} + +sha512sums="e3202d7bc547a5447eaeeeabe2ff18bd884c89c02cf54e27d88ca9cd14bcd9f080f7ff7e02d36538200c096df0442809c171c99e37b16ff818866c45b40eeef9 ws4py-0.5.1.tar.gz" |