示例#1
0
#-----------------------------------------------------------------------------
# Copyright (c) 2015-2018, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------

from PyInstaller.utils.hooks import is_module_satisfies
from PyInstaller import log as logging

if is_module_satisfies('kivy >= 1.9.1'):
    from kivy.tools.packaging.pyinstaller_hooks import (
        add_dep_paths, excludedimports, datas, get_deps_all,
        get_factory_modules, kivy_modules)

    add_dep_paths()

    hiddenimports = get_deps_all()['hiddenimports']
    hiddenimports = list(set(get_factory_modules() + kivy_modules +
                             hiddenimports))
else:
    logger = logging.getLogger(__name__)
    logger.warning('Hook disabled because of Kivy version < 1.9.1')
from kivy.tools.packaging.pyinstaller_hooks import (add_dep_paths,
                                                    excludedimports, datas,
                                                    get_deps_all,
                                                    get_factory_modules,
                                                    kivy_modules)

add_dep_paths()

hiddenimports = []  # get_deps_all()['hiddenimports']
hiddenimports = list(set(get_factory_modules() + kivy_modules + hiddenimports))
示例#3
0
from kivy.tools.packaging.pyinstaller_hooks import (
    add_dep_paths, excludedimports, datas, get_deps_all,
    get_factory_modules, kivy_modules)

add_dep_paths()

hiddenimports = []  # get_deps_all()['hiddenimports']
hiddenimports = list(set(
    get_factory_modules() + kivy_modules + hiddenimports))
#!/usr/bin/env python3
import os
from os.path import join

from kivy import kivy
from kivy.deps import sdl2, glew
from kivy.tools.packaging import pyinstaller_hooks as hooks

block_cipher = None
kivy_deps_all = hooks.get_deps_all()
kivy_factory_modules = hooks.get_factory_modules()

datas = [(join('common', '*.ini'), 'common')]

# list of modules to exclude from analysis
excludes_a = ['Tkinter', '_tkinter', 'twisted', 'docutils', 'pygments']

# list of hiddenimports
hiddenimports = kivy_deps_all['hiddenimports'] + kivy_factory_modules

# binary data
sdl2_bin_tocs = [Tree(p) for p in sdl2.dep_bins]
glew_bin_tocs = [Tree(p) for p in glew.dep_bins]
bin_tocs = sdl2_bin_tocs + glew_bin_tocs

# assets
kivy_assets_toc = Tree(kivy_data_dir, prefix=join('kivy_install', 'data'))
source_assets_toc = Tree('images', prefix='images')
assets_toc = [kivy_assets_toc, source_assets_toc]

tocs = bin_tocs + assets_toc
示例#5
0
from kivy.tools.packaging.pyinstaller_hooks import (
    add_dep_paths, excludedimports, datas, get_deps_all,
    get_factory_modules, kivy_modules)

add_dep_paths()

hiddenimports = []  # get_deps_all()['hiddenimports']
hiddenimports = list(set(
    get_factory_modules() + kivy_modules + hiddenimports))