Bugfix: Tzdata module missing on windows fixes #1653 (#1654)

* add hiddenimport for tzdata

* adding tzdata to specterd.spec
This commit is contained in:
Kim Neunert 2022-04-04 19:13:26 +02:00 committed by GitHub
parent 7ba96ac2fe
commit 0ada984243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,23 @@
# copied from https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-tzdata.py#L20
# ------------------------------------------------------------------
# Copyright (c) 2021 PyInstaller Development Team.
#
# This file is distributed under the terms of the GNU General Public
# License (version 2.0 or later).
#
# The full license is available in LICENSE.GPL.txt, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
# Collect timezone data files
datas = collect_data_files("tzdata")
# Collect submodules; each data subdirectory is in fact a package
# (e.g., zoneinfo.Europe), so we need its __init__.py for data files
# (e.g., zoneinfo/Europe/Ljubljana) to be discoverable via
# importlib.resources
hiddenimports = collect_submodules("tzdata")

View file

@ -57,7 +57,8 @@ a = Analysis(['specterd.py'],
],
hiddenimports=[
'pkg_resources.py2_warn',
'cryptoadvance.specter.config'
'cryptoadvance.specter.config',
'tzdata' # used by apscheduler and existing hook doesn't seem to be complete
],
hookspath=['hooks/'],
runtime_hooks=[],