def setUp(self, package = HOOKUTILS_TEST_FILES): self.basepath = join(os.getcwd(), HOOKUTILS_TEST_FILES) # Fun Python behavior: __import__('mod.submod') returns mod, # where as __import__('mod.submod', fromlist = [a non-empty list]) # returns mod.submod. See the docs on `__import__ # <http://docs.python.org/library/functions.html#__import__>`_. self.data_list = collect_data_files(__import__(package, fromlist = [''])) self.split_data_list()
#----------------------------------------------------------------------------- # Copyright (c) 2013, 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.hookutils import collect_data_files # On Linux pytz installed from distribution repository uses zoneinfo # fron /usr/share/zoneinfo/ and no data files might be collected. datas = collect_data_files('pytz')
#----------------------------------------------------------------------------- # Copyright (c) 2013, 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.hookutils import collect_data_files datas = collect_data_files('idlelib')
#----------------------------------------------------------------------------- # Copyright (c) 2013, 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.hookutils import collect_submodules, collect_data_files hiddenimports = collect_submodules('sphinx.ext') datas = collect_data_files('sphinx')
import os from PyInstaller.utils.hooks.hookutils import collect_data_files def get_virtual_env_extra_site_files(): return [ ( os.path.join( os.path.dirname(__file__), '..', 'wpull_env', 'lib', 'python*', '*.txt' ), './' ), ( os.path.join( os.path.dirname(__file__), '..', 'wpull_env', 'Lib', '*.txt' ), './' ) ] datas = collect_data_files('wpull') + get_virtual_env_extra_site_files()
""" from PyInstaller.compat import is_win, is_darwin from PyInstaller.utils.hooks.hookutils import collect_data_files from PyInstaller.utils.hooks.hookutils import opengl_arrays_modules # PlatformPlugin performs a conditional import based on os.name and # sys.platform. PyInstaller misses this so let's add it ourselves... if is_win: hiddenimports = ['OpenGL.platform.win32'] elif is_darwin: hiddenimports = ['OpenGL.platform.darwin'] # Use glx for other platforms (Linux, ...) else: hiddenimports = ['OpenGL.platform.glx'] # Arrays modules are needed too. hiddenimports += opengl_arrays_modules() # PyOpenGL 3.x uses ctypes to load DLL libraries. PyOpenGL windows installer # adds necessary dll files to # DLL_DIRECTORY = os.path.join( os.path.dirname( OpenGL.__file__ ), 'DLLS') # PyInstaller is not able to find these dlls. Just include them all as data # files. if is_win: datas = collect_data_files('OpenGL')
def test_4(self): self.data_list = collect_data_files(HOOKUTILS_TEST_FILES + '.subpkg') self.split_data_list() self.assert_data_list_equal(self.subpkg_subfiles)
def test_3(self): self.data_list = collect_data_files(HOOKUTILS_TEST_FILES) self.split_data_list() self.assert_data_list_equal(self.all_subfiles)
def test_0(self): # os is a module, not a package. with self.assertRaises(AttributeError): collect_data_files(__import__('os'))
#----------------------------------------------------------------------------- # Copyright (c) 2013, 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.hookutils import collect_data_files # IPython (tested with 0.13) requires the following files: # ./site-packages/IPython/config/profile/README_STARTUP datas = collect_data_files('IPython')
import os from PyInstaller.utils.hooks.hookutils import collect_data_files def get_virtual_env_extra_site_files(): return [(os.path.join(os.path.dirname(__file__), '..', 'wpull_env', 'lib', 'python*', '*.txt'), './'), (os.path.join(os.path.dirname(__file__), '..', 'wpull_env', 'Lib', '*.txt'), './')] datas = collect_data_files('wpull') + get_virtual_env_extra_site_files()
# ----------------------------------------------------------------------------- # Copyright (c) 2013, 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.hookutils import collect_submodules, collect_data_files hiddenimports = ( collect_submodules("docutils.languages") + collect_submodules("docutils.writers") + collect_submodules("docutils.parsers.rst.languages") + collect_submodules("docutils.parsers.rst.directives") ) datas = collect_data_files("docutils")