summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b70b2b0aa48e175155db4dcd16982fd6ad88b43f (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
# Maintainer: karboncore

pkgname=python-humps-git
pkgver=365.a0f712b
pkgrel=1
pkgdesc='Convert strings (and dictionary keys) between snake case, camel case and pascal case in Python'
arch=(any)
url=https://github.com/nficano/humps
license=(unlicense)
depends=(python python-poetry)
makedepends=(git python-build python-wheel python-installer)
provides=(${pkgname%-git})
source=(git+https://github.com/nficano/humps.git)
sha256sums=(SKIP)

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

build() {
  cd "$srcdir/humps"
  python -m build -wn
}

package() {
  cd "$srcdir/humps"
  python -m installer -d "$pkgdir" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname%-git}/
}