[arch-commits] Commit in python-tzlocal/repos (2 files)
Felix Yan
felixonmars at gemini.archlinux.org
Wed Dec 1 11:25:52 UTC 2021
Date: Wednesday, December 1, 2021 @ 11:25:52
Author: felixonmars
Revision: 1059179
archrelease: copy trunk to community-staging-any
Added:
python-tzlocal/repos/community-staging-any/
python-tzlocal/repos/community-staging-any/PKGBUILD
(from rev 1059178, python-tzlocal/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: python-tzlocal/repos/community-staging-any/PKGBUILD (from rev 1059178, python-tzlocal/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2021-12-01 11:25:52 UTC (rev 1059179)
@@ -0,0 +1,54 @@
+# 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=4.0.1
+pkgrel=2
+pkgdesc="Tzinfo object for the local timezone"
+arch=('any')
+url="https://github.com/regebro/tzlocal"
+license=('MIT')
+depends=('python-pytz-deprecation-shim')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-pytest-mock')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha256sums=('8560aabba61b5d2a5e1697bb781f682e6eaa3ce386cee85a09a458cc0003f836')
+b2sums=('6a55ef65f0c8bf791abdb8f0cb4c1f54abf4a47653e46dcb2246609fe66ef6d4c4121de48b3ec42d245c7cfd20ef242aae3381afd8b01f88dd67123402973e30')
+
+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}"
+ pytest -v
+}
+
+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