[arch-commits] Commit in (4 files)
Daniel M. Capella
polyzen at gemini.archlinux.org
Tue Oct 19 04:20:42 UTC 2021
Date: Tuesday, October 19, 2021 @ 04:20:40
Author: polyzen
Revision: 1030933
Add python-tzdata as dep of python-pytz-deprecation-shim
Added:
python-tzdata/
python-tzdata/repos/
python-tzdata/trunk/
python-tzdata/trunk/PKGBUILD
----------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Added: python-tzdata/trunk/PKGBUILD
===================================================================
--- python-tzdata/trunk/PKGBUILD (rev 0)
+++ python-tzdata/trunk/PKGBUILD 2021-10-19 04:20:40 UTC (rev 1030933)
@@ -0,0 +1,42 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=tzdata
+pkgname=python-tzdata
+pkgver=2021.2.post0
+pkgrel=1
+pkgdesc='Provider of IANA time zone data'
+arch=('any')
+url=https://github.com/python/tzdata
+license=('Apache')
+depends=('python')
+makedepends=('python-build' 'python-install' 'python-setuptools' 'python-wheel')
+checkdepends=('python-pytest' 'python-pytest-subtests')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('99d30a01967bb8d7868c03dc924862b1ae8a0e649a322a1107bacc1723c430b9')
+b2sums=('34648e3f086d395377be2f51dec7b1881942a7b72377d092a5338b8e4c3408c25eea693025ee75e4cd0f31667f19aa4da9fccdcad66ac23a0268142d62814bc0')
+
+build() {
+ cd $_name-$pkgver
+ python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd $_name-$pkgver
+ mkdir -p temp
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ python -m install --optimize=1 --destdir=temp dist/*.whl
+ PYTHONPATH="$PWD/temp/$site_packages" pytest tests
+}
+
+package() {
+ cd $_name-$pkgver
+ python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
+
+ # Symlink license file
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list