<s> from __future__ import absolute_import <EOL> import sys <EOL> import pip <EOL> from pip . compat import stdlib_pkgs <EOL> from pip . basecommand import Command <EOL> from pip . operations . freeze import freeze <EOL> from pip . wheel import WheelCache <EOL> DEV_PKGS = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> class FreezeCommand ( Command ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> usage = """<STR_LIT>""" <EOL> summary = '<STR_LIT>' <EOL> log_streams = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def __init__ ( self , * args , ** kw ) : <EOL> super ( FreezeCommand , self ) . __init__ ( * args , ** kw ) <EOL> self . cmd_opts . add_option ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT:store>' , <EOL> default = None , <EOL> metavar = '<STR_LIT:file>' , <EOL> help = "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> self . cmd_opts . add_option ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT>' , <EOL> default = [ ] , <EOL> metavar = '<STR_LIT>' , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> self . cmd_opts . add_option ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT:store_true>' , <EOL> default = False , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> self . cmd_opts . add_option ( <EOL> '<STR_LIT>' , <EOL> dest = '<STR_LIT:user>' , <EOL> action = '<STR_LIT:store_true>' , <EOL> default = False , <EOL> help = '<STR_LIT>' ) <EOL> self . cmd_opts . add_option ( <EOL> '<STR_LIT>' , <EOL> dest = '<STR_LIT>' , <EOL> action = '<STR_LIT:store_true>' , <EOL> help = '<STR_LIT>' <EOL> '<STR_LIT>' % '<STR_LIT:U+002CU+0020>' . join ( DEV_PKGS ) ) <EOL> self . parser . insert_option_group ( <NUM_LIT:0> , self . cmd_opts ) <EOL> def run ( self , options , args ) : <EOL> format_control = pip . index . FormatControl ( set ( ) , set ( ) ) <EOL> wheel_cache = WheelCache ( options . cache_dir , format_control ) <EOL> skip = set ( stdlib_pkgs ) <EOL> if not options . freeze_all : <EOL> skip . update ( DEV_PKGS ) <EOL> freeze_kwargs = dict ( <EOL> requirement = options . requirement , <EOL> find_links = options . find_links , <EOL> local_only = options . local , <EOL> user_only = options . user , <EOL> skip_regex = options . skip_requirements_regex , <EOL> isolated = options . isolated_mode , <EOL> wheel_cache = wheel_cache , <EOL> skip = skip ) <EOL> for line in freeze ( ** freeze_kwargs ) : <EOL> sys . stdout . write ( line + '<STR_LIT:\n>' ) </s>
