aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/py-websocket-client/APKBUILD48
-rw-r--r--testing/py-websocket-client/APKBUILD32
2 files changed, 48 insertions, 32 deletions
diff --git a/community/py-websocket-client/APKBUILD b/community/py-websocket-client/APKBUILD
new file mode 100644
index 0000000000..aa324cd31c
--- /dev/null
+++ b/community/py-websocket-client/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-websocket-client
+_pkgname=websocket_client
+pkgver=0.37.0
+pkgrel=0
+pkgdesc="WebSocket client library for Python"
+url="https://github.com/liris/websocket-client"
+arch="noarch"
+license="LGPL"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools py2-six py3-six"
+install=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="https://files.pythonhosted.org/packages/source/w/websocket-client/$_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
+}
+
+md5sums="5c2f16904dcb167bd2b85289c6e6fa6a websocket_client-0.37.0.tar.gz"
+sha256sums="678b246d816b94018af5297e72915160e2feb042e0cde1a9397f502ac3a52f41 websocket_client-0.37.0.tar.gz"
+sha512sums="b72f18c91d9a51a1943fc798601bcd9eac8b1ce807a2abb72b7cf897da30de808160645d9c7f3eaf2430e739cd0c6c01046c452f43c61af63afe7d31d801f9f7 websocket_client-0.37.0.tar.gz"
diff --git a/testing/py-websocket-client/APKBUILD b/testing/py-websocket-client/APKBUILD
deleted file mode 100644
index c1176b88e9..0000000000
--- a/testing/py-websocket-client/APKBUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# Contributor: Francesco Colista <fcolista@alpinelinux.org>
-# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
-pkgname=py-websocket-client
-_pkgname=websocket_client
-pkgver=0.35.0
-pkgrel=0
-pkgdesc="WebSocket client library for Python"
-url="https://github.com/liris/websocket-client"
-arch="noarch"
-license="LGPL"
-depends="python"
-depends_dev=""
-makedepends="$depends_dev py-setuptools py-six"
-install=""
-subpackages="$pkgname-doc"
-source="https://files.pythonhosted.org/packages/source/w/websocket-client/$_pkgname-$pkgver.tar.gz"
-
-builddir="$srcdir"/$_pkgname-$pkgver
-build() {
- cd "$builddir"
- python setup.py build || return 1
-}
-
-package() {
- cd "$builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-md5sums="37015cccff457f841c6f21bae86fa2d0 websocket_client-0.35.0.tar.gz"
-sha256sums="5ac3ead091be17b680a0dda926aef1a697a2b6cf1e9ac0fbe4bffb14914c2116 websocket_client-0.35.0.tar.gz"
-sha512sums="d2bfb27f1908882621db21badc9f665ed7b0c0164f47c29014fc87ae7aa52b81160c11b26dd8abd97ced5a3429a917034b1a94dfd8ecfa91637dec9d2857475a websocket_client-0.35.0.tar.gz"