archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pytzdata / trunk / PKGBUILD
blobc32b72f769c475e6e816486ec31557afb24d4e74
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=pytzdata
4 pkgname=python-pytzdata
5 pkgver=2020.1
6 pkgrel=8
7 pkgdesc="Official timezone database for Python."
8 arch=(any)
9 url="https://github.com/sdispater/pytzdata"
10 license=(MIT)
11 depends=(python python-cleo)
12 makedepends=(python-build python-installer python-poetry-core python-wheel)
13 checkdepends=(python-pytest)
14 source=(
15   $pkgname-$pkgver.tar.gz::https://github.com/sdispater/$_name/archive/$pkgver.tar.gz
16   $pkgname-2020.1-pep517_build_system.patch::https://github.com/sdispater/pytzdata/pull/13/commits/5eb35d299371dd096b32d49b0d4570c6d93c343d.patch
18 sha512sums=('fd154bfbe90ce07a90f769063b772234036d2627c1e6d78a465d9ddbc894e50cb9d821c04ebff1a7cc6a327266f7843fe54e5592d37c41db023329d6e0f668c2'
19             'b9219e1cd9aab3af73dc59d3a7a64e304c114ddcab530cb918475c5cfd9302a9737d347ca0cafeab9a3ced11609851e961dfcd8f89bed8293374e6187217306a')
20 b2sums=('6f07a7577edc87030fd70e720b32146e9044a8c6f74d0bafb9239ad666d0d6fd0ac7c3cca070914701af301b1a3368ace2985f8169b9747937fa6ed066be7302'
21         '2f562a0b3b76b8f75f5f896e694003d1944b778087baf55536efa0be0a440f3608933e2d49d643f6b5ec2737fec6b1945bd3d3021da7a59987dc57fa5b77dc00')
23 prepare() {
24   patch -Np1 -d $_name-$pkgver -i ../$pkgname-2020.1-pep517_build_system.patch
27 build() {
28   cd $_name-$pkgver
29   python -m build --wheel --no-isolation
32 check() {
33   cd $_name-$pkgver
34   pytest -vv
37 package() {
38   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
40   cd $_name-$pkgver
41   python -m installer --destdir="$pkgdir" dist/*.whl
43   cp -av $_name/zoneinfo/* "$pkgdir/$site_packages/$_name/zoneinfo/"
44   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
45   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"