summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0bf03bda65e1bc07ac4eefbf4cb5ab7ad68e46f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Maintainer: willemw <willemw12@gmail.com>

pkgname=python-pywapi-git
pkgver=r126.7f05282
pkgrel=2
pkgdesc='Python wrapper around the Yahoo! Weather, Weather.com and NOAA APIs'
arch=(any)
url=https://launchpad.net/python-weather-api
license=(MIT)
depends=(python)
makedepends=(git python-build python-installer python-wheel python-setuptools)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
#source=($pkgname::git+https://github.com/khurshid-alam/python-weather-api.git)
source=("$pkgname::git+https://git.launchpad.net/~khurshid-alam/python-weather-api/+git/trunk")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  git -C $pkgname clean -dfx
}

build() {
  cd $pkgname
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
  python -m installer --destdir="$pkgdir" dist/*.whl
}