Date: Thursday, April 6, 2023 @ 02:33:42
  Author: felixonmars
Revision: 1438107

archrelease: copy trunk to community-staging-any

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

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

Copied: python-tzlocal/repos/community-staging-any/PKGBUILD (from rev 1438103, 
python-tzlocal/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-06 02:33:42 UTC (rev 1438107)
@@ -0,0 +1,58 @@
+# Maintainer: David Runge <[email protected]>
+# Maintainer: Daniel M. Capella <[email protected]>
+# Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>
+# Contributor: Étienne Deparis <etienne [at] depar.is>
+# Contributor: Patrice Peterson <runiq at archlinux dot us>
+# Contributor: Patrick Burroughs <celticmadman at gmail dot com>
+
+_name=tzlocal
+pkgname=python-tzlocal
+pkgver=4.3
+pkgrel=2
+epoch=1
+pkgdesc="Tzinfo object for the local timezone"
+arch=('any')
+url="https://github.com/regebro/tzlocal";
+license=('MIT')
+depends=('python-pytz-deprecation-shim')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+             'python-wheel')
+checkdepends=('python-pytest' 'python-pytest-mock')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz";)
+sha256sums=('3f21d09e1b2aa9f2dacca12da240ca37de3ba5237a93addfd6d593afe9073355')
+b2sums=('a1b7ffe943fff5e0042e0e6e3ac4c53b8724b0a3142a67b4621441735e65e645710e15276bc074e178268a1663e6c6aae2ae6b889b5a820df3edf3292cf919f9')
+
+prepare() {
+  mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
+  cd "${pkgname}-${pkgver}"
+  # fix symlink, required for test: 
https://github.com/regebro/tzlocal/issues/53
+  cd tests/test_data/symlink_localtime/etc
+  ln -sfv ../usr/share/zoneinfo/Africa/Harare localtime
+}
+
+build() {
+  cd "${pkgname}-${pkgver}"
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd "${pkgname}-${pkgver}"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  pytest -v -k 'not test_conflicting and not test_noconflict'
+}
+
+package() {
+  cd "${pkgname}-${pkgver}"
+  python -m installer --destdir="${pkgdir}" dist/*.whl
+  # docs
+  install -vDm 644 {CHANGES.txt,README.rst} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+  # 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.txt \
+    "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to