[arch-commits] Commit in python-pytz-deprecation-shim/repos (2 files)

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


    Date: Tuesday, October 19, 2021 @ 04:22:52
  Author: polyzen
Revision: 1030936

archrelease: copy trunk to community-any

Added:
  python-pytz-deprecation-shim/repos/community-any/
  python-pytz-deprecation-shim/repos/community-any/PKGBUILD
    (from rev 1030935, python-pytz-deprecation-shim/trunk/PKGBUILD)

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

Copied: python-pytz-deprecation-shim/repos/community-any/PKGBUILD (from rev 1030935, python-pytz-deprecation-shim/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2021-10-19 04:22:52 UTC (rev 1030936)
@@ -0,0 +1,42 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+
+_name=pytz_deprecation_shim
+pkgname=python-pytz-deprecation-shim
+pkgver=0.1.0.post0
+pkgrel=1
+pkgdesc='Shims to make deprecation of pytz easier'
+arch=('any')
+url=https://github.com/pganssle/pytz-deprecation-shim
+license=('Apache')
+depends=('python-tzdata')
+makedepends=('python-build' 'python-install' 'python-setuptools' 'python-wheel')
+checkdepends=('python-hypothesis' 'python-pytest' 'python-pytz')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d')
+b2sums=('a6d186ca6fff17a3fb787ad6164fcf45fbac272e6123491a6822699cf54a115c9941f2b1ee3d227f531a0ab1d11846300dc24974611cc1671c77405606704754')
+
+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