package/python-tzlocal: new package

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Marcus Hoffmann
2025-02-25 14:46:25 +01:00
committed by Julien Olivain
parent cf4f2f858d
commit 6ca1ee306a
7 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
from tzlocal import get_localzone
from zoneinfo import ZoneInfo
tz = get_localzone()
assert tz == ZoneInfo(key='posix/Europe/Berlin')

View File

@@ -0,0 +1,14 @@
from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3TZLocal(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_TARGET_TZ_INFO=y
BR2_TARGET_LOCALTIME="Europe/Berlin"
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_TZLOCAL=y
"""
sample_scripts = ["tests/package/sample_python_tzlocal.py"]
timeout = 10