summarylogtreecommitdiffstats
path: root/PKGBUILD.in
blob: 3ac2091ebfd0eaae531045fa909cfc43ba8c8777 (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=include(`version')dnl
_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"
}