def hook(hook_api): packages = ['astor'] for package in packages: datas, binaries, hiddenimports = collect_all(package) hook_api.add_datas(datas) hook_api.add_binaries(binaries) hook_api.add_imports(*hiddenimports)
def hook(hook_api): packages = ['flask', 'flask_compress', 'flask_caching'] for package in packages: datas, binaries, hiddenimports = collect_all(package) hook_api.add_datas(datas) hook_api.add_binaries(binaries) hook_api.add_imports(*hiddenimports)
def hook(hook_api): packages = ['tensorflow', 'tensorflow_core', 'astor', 'hyperlpr'] for package in packages: datas, binaries, hiddenimports = collect_all(package) hook_api.add_datas(datas) hook_api.add_binaries(binaries) hook_api.add_imports(*hiddenimports)
def hook(hook_api): packages = [ 'tensorflow', 'astor', 'sklearn', 'sklearn.utils._cython_blas', 'spleeter' ] for package in packages: datas, binaries, hiddenimports = collect_all(package) hook_api.add_datas(datas) hook_api.add_binaries(binaries) hook_api.add_imports(*hiddenimports)
# -*- coding: utf-8 -*- # This software is a part of the A.O.D apprepo project # Copyright 2020 Alex Woroschilow ([email protected]) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import sys import glob import os from PyInstaller import log as logging from PyInstaller.utils.hooks import (collect_all, collect_submodules, collect_data_files, get_module_file_attribute, get_module_attribute) logger = logging.getLogger(__name__) datas, binaries, hiddenimports = collect_all('adminplus')
# HOOK FILE FOR SPACY from PyInstaller.utils.hooks import collect_all import spacy # ----------------------------- SPACY ----------------------------- data = collect_all('spacy') datas = data[0] datas.append((spacy.util.get_data_path(), 'spacy/data')) binaries = data[1] hiddenimports = data[2] # ----------------------------- THINC ----------------------------- data = collect_all('thinc') datas += data[0] binaries += data[1] hiddenimports += data[2] # ----------------------------- CYMEM ----------------------------- data = collect_all('cymem') datas += data[0] binaries += data[1] hiddenimports += data[2] # ----------------------------- PRESHED ----------------------------- data = collect_all('preshed') datas += data[0]
from PyInstaller.utils.hooks import collect_all # ----------------------------- ja_ginza ----------------------------- data = collect_all('ja_ginza') datas = data[0] binaries = data[1] hiddenimports = data[2]
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('missionbio.mosaic')
# from PyInstaller.utils.hooks import copy_metadata # datas = copy_metadata('torchaudio') from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('torchaudio')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('pynndescent')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('dash_core_components')
from PyInstaller.utils.hooks import collect_submodules, collect_data_files, exec_statement, collect_all datas, binaries, hiddenimports = collect_all('scipy', include_py_files=True) print("\n\nDATAS (scipy): ") print(len(datas)) print("\n\nBINARIES (scipy): ") print(len(binaries)) print("\n\nHIDDENIMPORTS (scipy): ") print(len(hiddenimports)) print("\n\n") # https://stackoverflow.com/questions/49085970/no-such-file-or-directory-error-using-pyinstaller-and-scrapy/49092020#49092020
# hooks/hook-dash_core_components.py from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('dash_bootstrap_components')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('plotly')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('tzlocal')
#----------------------------------------------------------------------------- # 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 collect_all datas, binaries, hiddenimports = collect_all('gevent')
from PyInstaller.utils.hooks import collect_all # ----------------------------- ginza ----------------------------- data = collect_all('ginza') datas = data[0] binaries = data[1] hiddenimports = data[2]
def hook(hook_api): for pkg in ['pip', 'setuptools', 'distutils', 'pkg_resources']: datas, binaries, hiddenimports = collect_all(pkg) hook_api.add_datas(datas) hook_api.add_binaries(binaries) hook_api.add_imports(*hiddenimports)
# ----------------------------------------------------------------------------- # Copyright (c) 2015-2019, 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. # ----------------------------------------------------------------------------- # Hook for textdistance: https://pypi.org/project/textdistance/4.1.3/ from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('textdistance')
from PyInstaller.utils.hooks import collect_all # ----------------------------- mlask ----------------------------- data = collect_all('mlask') datas = data[0] binaries = data[1] hiddenimports = data[2]
#----------------------------------------------------------------------------- # Copyright (c) 2015-2019, 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 collect_all datas, binaries, hiddenimports = collect_all('gevent')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all("xgboost")
#----------------------------------------------------------------------------- # Copyright (c) 2015-2021, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt, distributed with this software. # # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) #----------------------------------------------------------------------------- from PyInstaller.utils.hooks import collect_all, copy_metadata excludedimports = ["gevent.testing", "gevent.tests"] datas, binaries, hiddenimports = collect_all( 'gevent', filter_submodules=lambda name: ("gevent.testing" not in name or "gevent.tests" not in name), include_py_files=False, exclude_datas=["**/tests"]) # Gevent uses ``pkg_resources.require("...")`` which means that all its # dependencies must also have their metadata. datas += copy_metadata('gevent', recursive=True)
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('sacremoses') # from PyInstaller.utils.hooks import copy_metadata # datas = copy_metadata('sacremoses')
# Tested with django 1.8. import sys import glob import os from PyInstaller import log as logging from PyInstaller.utils.hooks import ( django_find_root_dir, django_dottedstring_imports, collect_all, collect_submodules, collect_data_files, get_module_file_attribute, get_module_attribute) logger = logging.getLogger(__name__) datas, binaries, hiddenimports = collect_all('django') root_dir = django_find_root_dir() if root_dir: logger.info('Django root directory %s', root_dir) # Include imports from the mysite.settings.py module. settings_py_imports = django_dottedstring_imports(root_dir) # Include all submodules of all imports detected in mysite.settings.py. for submod in settings_py_imports: hiddenimports.append(submod) hiddenimports += collect_submodules(submod) # Include main django modules - settings.py, urls.py, wsgi.py. # Without them the django server won't run. package_name = os.path.basename(root_dir) hiddenimports += [
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('regex') # from PyInstaller.utils.hooks import copy_metadata # datas = copy_metadata('regex')
# Copyright 2020 Alex Woroschilow ([email protected]) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import sys import glob import os from PyInstaller import log as logging from PyInstaller.utils.hooks import (collect_all, collect_submodules, collect_data_files, get_module_file_attribute, get_module_attribute) logger = logging.getLogger(__name__) datas, binaries, hiddenimports = collect_all('chunked_upload') # logger.info('Django root directory %s', root_dir) # for test in hiddenimports: # print(test)
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('pycountry')
from PyInstaller.utils.hooks import collect_all datas, binaries, hiddenimports = collect_all('altair')
from PyInstaller.utils.hooks import collect_data_files, collect_all datas, binaries, hiddenimports = collect_all('ScoutSuite') datas.extend(collect_data_files('policyuniverse')) hiddenimports.append('configparser')
# Copyright 2020 Alex Woroschilow ([email protected]) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import sys import glob import os from PyInstaller import log as logging from PyInstaller.utils.hooks import (collect_all, collect_submodules, collect_data_files, get_module_file_attribute, get_module_attribute) logger = logging.getLogger(__name__) datas, binaries, hiddenimports = collect_all('rest_framework') # logger.info('Django root directory %s', root_dir) # for test in hiddenimports: # print(test)