<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import os <EOL> from sysconfig import get_python_version <EOL> from distutils . util import get_platform <EOL> from distutils . core import Command <EOL> from distutils . dir_util import remove_tree , ensure_relative <EOL> from distutils . errors import DistutilsPlatformError <EOL> from distutils import log <EOL> class bdist_dumb ( Command ) : <EOL> description = '<STR_LIT>' <EOL> user_options = [ ( '<STR_LIT>' , '<STR_LIT:d>' , <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:p>' , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" % get_platform ( ) ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:f>' , <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:k>' , <EOL> "<STR_LIT>" + <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:d>' , <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , None , <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , None , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:u>' , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:g>' , <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) , <EOL> ] <EOL> boolean_options = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> default_format = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> def initialize_options ( self ) : <EOL> self . bdist_dir = None <EOL> self . plat_name = None <EOL> self . format = None <EOL> self . keep_temp = <NUM_LIT:0> <EOL> self . dist_dir = None <EOL> self . skip_build = <NUM_LIT:0> <EOL> self . relative = <NUM_LIT:0> <EOL> self . owner = None <EOL> self . group = None <EOL> def finalize_options ( self ) : <EOL> if self . bdist_dir is None : <EOL> bdist_base = self . get_finalized_command ( '<STR_LIT>' ) . bdist_base <EOL> self . bdist_dir = os . path . join ( bdist_base , '<STR_LIT>' ) <EOL> if self . format is None : <EOL> try : <EOL> self . format = self . default_format [ os . name ] <EOL> except KeyError : <EOL> raise DistutilsPlatformError , ( "<STR_LIT>" + <EOL> "<STR_LIT>" ) % os . name <EOL> self . set_undefined_options ( '<STR_LIT>' , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> def run ( self ) : <EOL> if not self . skip_build : <EOL> self . run_command ( '<STR_LIT>' ) <EOL> install = self . reinitialize_command ( '<STR_LIT>' , reinit_subcommands = <NUM_LIT:1> ) <EOL> install . root = self . bdist_dir <EOL> install . skip_build = self . skip_build <EOL> install . warn_dir = <NUM_LIT:0> <EOL> log . info ( "<STR_LIT>" % self . bdist_dir ) <EOL> self . run_command ( '<STR_LIT>' ) <EOL> archive_basename = "<STR_LIT>" % ( self . distribution . get_fullname ( ) , <EOL> self . plat_name ) <EOL> if os . name == "<STR_LIT>" : <EOL> archive_basename = archive_basename . replace ( "<STR_LIT::>" , "<STR_LIT:->" ) <EOL> pseudoinstall_root = os . path . join ( self . dist_dir , archive_basename ) <EOL> if not self . relative : <EOL> archive_root = self . bdist_dir <EOL> else : <EOL> if ( self . distribution . has_ext_modules ( ) and <EOL> ( install . install_base != install . install_platbase ) ) : <EOL> raise DistutilsPlatformError , ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> % ( repr ( install . install_base ) , <EOL> repr ( install . install_platbase ) ) ) <EOL> else : <EOL> archive_root = os . path . join ( self . bdist_dir , <EOL> ensure_relative ( install . install_base ) ) <EOL> filename = self . make_archive ( pseudoinstall_root , <EOL> self . format , root_dir = archive_root , <EOL> owner = self . owner , group = self . group ) <EOL> if self . distribution . has_ext_modules ( ) : <EOL> pyversion = get_python_version ( ) <EOL> else : <EOL> pyversion = '<STR_LIT>' <EOL> self . distribution . dist_files . append ( ( '<STR_LIT>' , pyversion , <EOL> filename ) ) <EOL> if not self . keep_temp : <EOL> remove_tree ( self . bdist_dir , dry_run = self . dry_run ) </s>
