41 lines
1 KiB
Text
41 lines
1 KiB
Text
|
# Maintainer: Antoine Martin <dev@ayakael.net>
|
||
|
|
||
|
pkgname='py3-tzlocal'
|
||
|
pkgver=4.2
|
||
|
pkgrel=0
|
||
|
arch='noarch'
|
||
|
pkgdesc="Tzinfo object for the local timezone"
|
||
|
url="https://pypi.python.org/pypi/pytz"
|
||
|
license="MIT"
|
||
|
depends="python3 py3-tz py3-tzdata py3-pytz-deprecation-shim"
|
||
|
makedepends="py3-setuptools py3-mock"
|
||
|
checkdepends="py3-pytest py3-pytest-mock"
|
||
|
source="${pkgname}-${pkgver}.tar.gz::https://pypi.io/packages/source/t/tzlocal/tzlocal-${pkgver}.tar.gz"
|
||
|
options="!check"
|
||
|
builddir="$srcdir"/tzlocal-$pkgver
|
||
|
|
||
|
prepare() {
|
||
|
ln -sfv ../usr/share/zoneinfo/Africa/Harare "$builddir"/tests/test_data/symlink_localtime/etc/localtime
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
python3 setup.py build
|
||
|
}
|
||
|
|
||
|
check(){
|
||
|
export PYTHONPATH="build:${PYTHONPATH}"
|
||
|
pytest -v tests/test_tzlocal.py
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
python3 setup.py install \
|
||
|
--skip-build \
|
||
|
--optimize=1 \
|
||
|
--prefix=/usr \
|
||
|
--root="$pkgdir"
|
||
|
}
|
||
|
|
||
|
sha512sums="
|
||
|
5d1000bd8756ca2678655dbeedcfd6ef8d709503293303c98a48af234aca0d1525913585d679759c6fd7d4c5ef046c98384ee6e7a9eba769f81d05173ff0d77f py3-tzlocal-4.2.tar.gz
|
||
|
"
|