Distribute PyInstaller hook
This uses a feature introduced in PyInstaller 4.0 to register hooks as entry points and automatically discover them whenever a module is used.
This commit is contained in:
parent
d0162cfb32
commit
d93fed567c
3 changed files with 9 additions and 3 deletions
6
dosagelib/__pyinstaller/__init__.py
Normal file
6
dosagelib/__pyinstaller/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (C) 2020 Tobias Gruetzmacher
|
||||
import os
|
||||
|
||||
def get_hook_dirs():
|
||||
return [os.path.dirname(__file__)]
|
|
@ -1,7 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||
# Copyright (C) 2015-2017 Tobias Gruetzmacher
|
||||
# Copyright (C) 2016-2020 Tobias Gruetzmacher
|
||||
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
|
||||
|
||||
hiddenimports = collect_submodules('dosagelib.plugins')
|
|
@ -46,6 +46,8 @@ setup_requires =
|
|||
[options.entry_points]
|
||||
console_scripts =
|
||||
dosage = dosagelib.cmd:main
|
||||
pyinstaller40 =
|
||||
hook-dirs = dosagelib.__pyinstaller:get_hook_dirs
|
||||
|
||||
[options.extras_require]
|
||||
bash =
|
||||
|
|
Loading…
Reference in a new issue