Example #1
0
# distutils module requires Makefile and pyconfig.h files from Python
# installation. 'distutils.sysconfig' parses these files to get some
# information from them.
_CONFIG_H = distutils.sysconfig.get_config_h_filename()
_MAKEFILE = distutils.sysconfig.get_makefile_filename()


# In virtualenv sys.prefix is overridden.
if hasattr(sys, 'real_prefix'):
    sys_prefix = sys.real_prefix
else:
    sys_prefix = sys.prefix


# Relative path to config_h in the dist directory.
_frozen_config_h = compat.relpath(os.path.dirname(_CONFIG_H), sys_prefix)
# Data files in PyInstaller hook format.
datas = [
    (_CONFIG_H, _frozen_config_h),
]


# On Windows Makefile does not exist.
if not is_win:
    _frozen_makefile = compat.relpath(os.path.dirname(_MAKEFILE), sys_prefix)
    datas.append((_MAKEFILE, _frozen_makefile))


def hook(mod):
    """
    Contributed by [email protected]
def _relpath(filename):
    # Relative path in the dist directory.
    return compat.relpath(os.path.dirname(filename), sys.prefix)
Example #3
0
def _relpath(filename):
    # Relative path in the dist directory.
    prefix = _find_prefix(filename)
    return compat.relpath(os.path.dirname(filename), prefix)
Example #4
0
# distutils module requires Makefile and pyconfig.h files from Python
# installation. 'distutils.sysconfig' parses these files to get some
# information from them.
_CONFIG_H = distutils.sysconfig.get_config_h_filename()
_MAKEFILE = distutils.sysconfig.get_makefile_filename()


# In virtualenv sys.prefix is overridden.
if hasattr(sys, 'real_prefix'):
    sys_prefix = sys.real_prefix
else:
    sys_prefix = sys.prefix


# Relative path to config_h in the dist directory.
_frozen_config_h = compat.relpath(os.path.dirname(_CONFIG_H), sys_prefix)
# Data files in PyInstaller hook format.
datas = [
    (_CONFIG_H, _frozen_config_h),
]


# On Windows Makefile does not exist.
if not is_win:
    _frozen_makefile = compat.relpath(os.path.dirname(_MAKEFILE), sys_prefix)
    datas.append((_MAKEFILE, _frozen_makefile))


def hook(mod):
    """
    Contributed by [email protected]
Example #5
0
def _relpath(filename):
    # Relative path in the dist directory.
    return compat.relpath(os.path.dirname(filename), sys.prefix)
Example #6
0
def _relpath(filename):
    # Relative path in the dist directory.
    prefix = _find_prefix(filename)
    return compat.relpath(os.path.dirname(filename), prefix)