<s> import os <EOL> import shutil <EOL> import sys <EOL> import bbfreeze . recipes <EOL> from itertools import ifilter <EOL> from bbfreeze import Freezer <EOL> from livestreamer import __version__ <EOL> def recipe_pycparser ( mf ) : <EOL> m = mf . findNode ( "<STR_LIT>" ) <EOL> if not m : <EOL> return <EOL> mf . import_hook ( "<STR_LIT>" , m , [ '<STR_LIT:*>' ] ) <EOL> return True <EOL> bbfreeze . recipes . recipe_pycparser = recipe_pycparser <EOL> build_version = __version__ <EOL> python_path = sys . prefix <EOL> script = os . path . join ( python_path , "<STR_LIT>" ) <EOL> script_exe = os . path . join ( python_path , "<STR_LIT>" ) <EOL> shutil . copy ( script , script_exe ) <EOL> includes = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> manual_copy = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> freezer_path = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> dst = "<STR_LIT>" . format ( freezer_path , build_version ) <EOL> site_packages = next ( ifilter ( lambda p : p . endswith ( "<STR_LIT>" ) , sys . path ) ) <EOL> f = Freezer ( dst , includes = includes ) <EOL> f . include_py = False <EOL> f . addScript ( script_exe , gui_only = False ) <EOL> f ( ) <EOL> for pkg in manual_copy : <EOL> src = os . path . join ( site_packages , pkg ) <EOL> pkgdst = os . path . join ( dst , pkg ) <EOL> shutil . copytree ( src , pkgdst ) </s>
