summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 09f7de555b05483b714ac57a6134cc082ea7dd8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
pkgname=python-pysma
pkgver=0.7.4
_pypiname=${pkgname#python-}
pkgrel=1
pkgdesc="Async library for SMA Solar's WebConnect interface"
arch=(any)
url="https://github.com/kellerza/pysma"
license=(Apache-2.0)
makedepends=("python" "python-pip")
depends=("python-jmespath")

build() {
  pip install --no-deps --target="${_pypiname}" ${_pypiname}==${pkgver}
}

package() {
  sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
  mkdir -p $pkgdir/"$sitepackages"
  cp -r $srcdir/${_pypiname}/* $pkgdir/"$sitepackages"
}