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

Felix Yan felixonmars at archlinux.org
Mon Nov 9 16:55:54 UTC 2020


    Date: Monday, November 9, 2020 @ 16:55:53
  Author: felixonmars
Revision: 747703

archrelease: copy trunk to community-staging-any

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

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

Copied: python-tzlocal/repos/community-staging-any/PKGBUILD (from rev 747701, python-tzlocal/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-09 16:55:53 UTC (rev 747703)
@@ -0,0 +1,55 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# 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=2.1
+pkgrel=2
+pkgdesc="Tzinfo object for the local timezone"
+arch=('any')
+url="https://github.com/regebro/tzlocal"
+license=('MIT')
+depends=('python-pytz')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-mock')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha512sums=('5419f3316dfcbf0355cc6f0790454fe6cecfa8b1ae17bfa7bf8aff89b0af3e63c94ffe9c22b11f612e53826a33e7179ff71bc2a86f6a358cdff36c7ae34e2453')
+
+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 setup.py build
+}
+
+check() {
+  cd "${pkgname}-${pkgver}"
+  export PYTHONPATH="build:${PYTHONPATH}"
+  # disable failing timezone test:
+  # https://github.com/regebro/tzlocal/issues/89
+  pytest -v tests/tests.py -k 'not test_fail'
+}
+
+package() {
+  cd "${pkgname}-${pkgver}"
+  python setup.py install --skip-build \
+                          --optimize=1 \
+                          --prefix=/usr \
+                          --root="${pkgdir}"
+  # license
+  install -vDm 644 LICENSE.txt \
+    -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  # docs
+  install -vDm 644 {CHANGES.txt,README.rst} \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list