summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 700180bbf912c1243307ce6bb59c3c76a5d162fc (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Sophie Tauchert <sophie@999eagle.moe>
pkgname=python-timeago
_name=${pkgname#python-}
pkgver=1.0.16
pkgrel=3
pkgdesc="Simple library used to format datetime with \`***time ago\` statement."
arch=('any')
url="https://github.com/hustcc/timeago"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('7b54b88b3d0566cbf01ca11077dad8f7ae07a4318479e3d1b30feebe85f7137f')

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --no-isolation
}

check() {
  cd "$_name-$pkgver"
  python test/testcase.py
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}