[arch-commits] Commit in python-tzdata/repos (community-any community-any/PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Tue Oct 19 04:21:02 UTC 2021


    Date: Tuesday, October 19, 2021 @ 04:21:02
  Author: polyzen
Revision: 1030934

archrelease: copy trunk to community-any

Added:
  python-tzdata/repos/community-any/
  python-tzdata/repos/community-any/PKGBUILD
    (from rev 1030933, python-tzdata/trunk/PKGBUILD)

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Copied: python-tzdata/repos/community-any/PKGBUILD (from rev 1030933, python-tzdata/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-10-19 04:21:02 UTC (rev 1030934)
@@ -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