Unverified Commit 4285f8da authored by prspkt's avatar prspkt

testing/py-mystrom: drop python2

Signed-off-by: prspkt's avatarprspkt <prspkt@protonmail.com>
parent 75af9adb
# 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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment