archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-jinja-time / repos / community-any / PKGBUILD
blob3bece2c4f32f369dedf0b4b86dece69e2374f499
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=jinja2-time
4 pkgname=python-jinja-time
5 pkgver=0.2.0
6 pkgrel=9
7 pkgdesc="Jinja2 Extension for Dates and Times"
8 arch=(any)
9 url="https://github.com/hackebrot/jinja2-time"
10 license=(MIT)
11 depends=(python-arrow python-jinja)
12 makedepends=(python-build python-installer python-setuptools python-wheel)
13 checkdepends=(python-freezegun python-pytest)
14 source=(
15   https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
16   $pkgname-0.2.0-arrow_shift.patch
18 sha512sums=('8ac4686312cde689f7a431001833d5d477030c4f5e9470d949bd07a40fcb9521f6ddcde37a72468093121ff9451e352a0bb43d20a796d7a204cf94e8a7545f2c'
19             '0286a608702bb445cf29da7900ec04f5b1f64d1e9658b84f9a90018adf5fce5cc959832abff73fa017afcaf0a0f6be85060e52a79038bf770b8b37d8c96a5e7d')
20 b2sums=('370318000b1c91bc3460861d389da667f6d7e840c4f9d9d1661491c9bf1b422b8ecff12d1da2467e7a9596d12832790e314c3298672d70b38b92a53198df0156'
21         '7285125450d338d4e4c927761b5eb93778f51bd5b260fcdf1ac720006d61faaee2b928a869337cd6f9e7905140810ebe6047fd3c954501c86e1185f85f1517d3')
23 prepare() {
24   # fix the way python-arrow is used: https://github.com/hackebrot/jinja2-time/issues/15
25   patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.2.0-arrow_shift.patch
28 build() {
29   cd $_name-$pkgver
30   python -m build --wheel --no-isolation
33 check() {
34   cd $_name-$pkgver
35   export PYTHONPATH="build:$PYTHONPATH"
36   pytest -vv
39 package() {
40   cd $_name-$pkgver
41   python -m installer --destdir="$pkgdir" dist/*.whl
42   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
43   install -vDm 644 {CONTRIBUTING,CONTRIBUTORS,HISTORY,README}.rst -t "$pkgdir/usr/share/doc/$pkgname/"