[arch-commits] Commit in python-tzdata/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Wed Dec 1 01:00:17 UTC 2021


    Date: Wednesday, December 1, 2021 @ 01:00:17
  Author: felixonmars
Revision: 1059095

archrelease: copy trunk to community-staging-any

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

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

Copied: python-tzdata/repos/community-staging-any/PKGBUILD (from rev 1059094, python-tzdata/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-12-01 01:00:17 UTC (rev 1059095)
@@ -0,0 +1,41 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=tzdata
+pkgname=python-tzdata
+pkgver=2021.5
+pkgrel=2
+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=('68dbe41afd01b867894bbdfd54fa03f468cfa4f0086bfb4adcd8de8f24f3ee21')
+b2sums=('c49681397bddd41a575216549700e9095dedec5306cc653c8f47a3eda811b83fff408efbc67f849cc52548befbc9888dd05bc9c2d8f1b297dff0a46da6909982')
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd $_name-$pkgver
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m install --optimize=1 dist/*.whl
+  test-env/bin/python -m pytest
+}
+
+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