Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
#-----------------------------------------------------------------------------
# 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')
Ejemplo n.º 3
0
#-----------------------------------------------------------------------------
# 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')
Ejemplo n.º 4
0
#-----------------------------------------------------------------------------
# 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')
Ejemplo n.º 5
0
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()
Ejemplo n.º 6
0
"""


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')
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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)
Ejemplo n.º 9
0
 def test_0(self):
     # os is a module, not a package.
     with self.assertRaises(AttributeError):
         collect_data_files(__import__('os'))
Ejemplo n.º 10
0
#-----------------------------------------------------------------------------
# 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')
Ejemplo n.º 11
0
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()
Ejemplo n.º 12
0
# -----------------------------------------------------------------------------
# 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")