python3-tzlocal: update to 4.2.

This commit is contained in:
icp 2022-08-27 00:49:02 +05:30 committed by Đoàn Trần Công Danh
parent b7ee396eda
commit e08ad7bf55
2 changed files with 21 additions and 17 deletions

View File

@ -0,0 +1,12 @@
--- a/tests/test_tzlocal.py
+++ b/tests/test_tzlocal.py
@@ -205,6 +205,9 @@
def test_win32_no_dst(mocker):
+ sys.modules["winreg"] = MagicMock()
+ import tzlocal.win32
+
mocker.patch("tzlocal.utils.assert_tz_offset")
valuesmock = mocker.patch("tzlocal.win32.valuestodict")

View File

@ -1,28 +1,20 @@
# Template file for 'python3-tzlocal' # Template file for 'python3-tzlocal'
pkgname=python3-tzlocal pkgname=python3-tzlocal
version=2.1 version=4.2
revision=4 revision=1
wrksrc="tzlocal-${version}" wrksrc="tzlocal-${version}"
build_style=python3-module build_style=python3-pep517
hostmakedepends="python3-setuptools" hostmakedepends="python3-wheel"
depends="python3-pytz" depends="python3-pytz_deprecation_shim"
checkdepends="python3-pytz python3-mock" checkdepends="${depends} python3-pytest-mock python3-pytest-xdist"
short_desc="Return the tzinfo object for the local timezone (Python 3)" short_desc="Return the tzinfo object for the local timezone (Python 3)"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT" license="MIT"
homepage="https://github.com/regebro/tzlocal" homepage="https://github.com/regebro/tzlocal"
changelog="https://raw.githubusercontent.com/regebro/tzlocal/master/CHANGES.txt" changelog="https://raw.githubusercontent.com/regebro/tzlocal/master/CHANGES.txt"
distfiles="${PYPI_SITE}/t/tzlocal/tzlocal-${version}.tar.gz" distfiles="https://github.com/regebro/tzlocal/archive/refs/tags/${version}.tar.gz"
checksum=643c97c5294aedc737780a49d9df30889321cbe1204eac2c2ec6134035a92e44 checksum=9bbfaedb6083467003bd1a622a412a7b2f1608f45b2d9132bf936f55fe72d65e
post_patch() {
# In tzlocal development tree, below file is a symlink
# Hence, the check correctly report its value
rm -f tests/test_data/symlink_localtime/etc/localtime
ln -s ../usr/share/zoneinfo/Africa/Harare \
tests/test_data/symlink_localtime/etc/localtime
}
post_install() { post_install() {
vlicense LICENSE.txt LICENSE vlicense LICENSE.txt
} }