aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-08-20 00:00:00 +0300
committerprspkt <prspkt@protonmail.com>2019-08-20 00:08:55 +0300
commit4285f8da43675fa378ac1282ef04d7f9d57a7d57 (patch)
tree82eb9888c6df72d7674248f9560f8f7fa5543fde /testing
parent75af9adb6f8c879b84e5962b307cc92007dcdc73 (diff)
downloadaports-4285f8da43675fa378ac1282ef04d7f9d57a7d57.tar.bz2
aports-4285f8da43675fa378ac1282ef04d7f9d57a7d57.tar.xz
testing/py-mystrom: drop python2
Signed-off-by: prspkt <prspkt@protonmail.com>
Diffstat (limited to 'testing')
-rw-r--r--testing/py3-python-mystrom/APKBUILD (renamed from testing/py-mystrom/APKBUILD)37
1 files changed, 8 insertions, 29 deletions
diff --git a/testing/py-mystrom/APKBUILD b/testing/py3-python-mystrom/APKBUILD
index cb8ddda895..674a378ef4 100644
--- a/testing/py-mystrom/APKBUILD
+++ b/testing/py3-python-mystrom/APKBUILD
@@ -1,6 +1,6 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
-pkgname=py-mystrom
+pkgname=py3-python-mystrom
_pkgname=python-mystrom
pkgver=0.3.8
pkgrel=1
@@ -8,41 +8,20 @@ pkgdesc="Python API for controlling myStrom switches/plugs"
url="https://github.com/fabaff/python-mystrom"
arch="noarch"
license="MIT"
-depends="py-requests"
-makedepends="python2-dev py-setuptools python3-dev"
-subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
+depends="py3-requests"
+makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
+replaces=py-mystrom # Backwards compatibility
+provides=py-mystrom=$pkgver-r$pkgrel # Backwards compatibility
+
build() {
- cd "$builddir"
- python2 setup.py build || return 1
- python3 setup.py build || return 1
+ python3 setup.py build
}
package() {
- mkdir -p "$pkgdir"
-}
-
-_py2() {
- replaces="$pkgname"
- depends="${depends//py-/py2-}"
- _py python2
-}
-
-_py3() {
- depends="${depends//py-/py3-}"
- _py python3
-}
-
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- depends="$depends $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="ac28df4d80ac5754234233def2131cb38073f4c4ec9301b5b40d17ea984cec6c06b354916b87bdbaee1693ed7c4adeeb575a5a618dde9c04412361973f3f76e0 python-mystrom-0.3.8.tar.gz"