[arch-commits] Commit in python-tzlocal/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Oct 25 20:04:41 UTC 2019
Date: Friday, October 25, 2019 @ 20:04:40
Author: foutrelis
Revision: 519712
archrelease: copy trunk to community-staging-any
Added:
python-tzlocal/repos/community-staging-any/
python-tzlocal/repos/community-staging-any/PKGBUILD
(from rev 519711, python-tzlocal/trunk/PKGBUILD)
----------+
PKGBUILD | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
Copied: python-tzlocal/repos/community-staging-any/PKGBUILD (from rev 519711, python-tzlocal/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 20:04:40 UTC (rev 519712)
@@ -0,0 +1,71 @@
+# Maintainer: David Runge <dave at sleepmap.de>
+# 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
+pkgbase=python-tzlocal
+pkgname=("python-tzlocal" "python2-tzlocal")
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Tzinfo object for the local timezone"
+arch=('any')
+url="https://github.com/regebro/tzlocal"
+license=('MIT')
+makedepends=('python-pytz' 'python-setuptools' 'python2-pytz' 'python2-setuptools')
+checkdepends=('python-mock' 'python2-mock')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha512sums=('b72487f791df1dda7370ef5de58e524a451bf87a2ad5ce9d365591fb45af1e080499956d9b19410aeacdf3013ce09c84cd3ec243e15d3bbbee4cec32685298d9')
+
+prepare() {
+ mv -v "${_name}-${pkgver}" "${pkgbase}-${pkgver}"
+ # fix symlink, required for test: https://github.com/regebro/tzlocal/issues/53
+ (
+ cd "${pkgbase}-${pkgver}/tests/test_data/symlink_localtime/etc"
+ ln -sfv ../usr/share/zoneinfo/Africa/Harare localtime
+ )
+}
+
+build() {
+ cd "${pkgbase}-${pkgver}"
+ python setup.py build
+ python2 setup.py build
+}
+
+check() {
+ cd "${pkgbase}-${pkgver}"
+ python setup.py test
+ python2 setup.py test
+}
+
+package_python-tzlocal() {
+ depends=('python-pytz')
+ cd "${pkgbase}-${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}"
+}
+
+package_python2-tzlocal() {
+ depends=('python2-pytz')
+ cd "${pkgbase}-${pkgver}"
+ python2 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