#NEWLINE# def build( self , autobuilding = False ) : #NEWLINE# #INDENT# 'Build wheels.\n\n        :param unpack: If True, replace the sdist we built from the with the\n            newly built wheel, in preparation for installation.\n        :return: True if all the wheels built correctly.\n        ' #NEWLINE# assert ( self . _wheel_dir or ( autobuilding and self . _cache_root ) ) #NEWLINE# self . requirement_set . prepare_files ( self . finder ) #NEWLINE# reqset = self . requirement_set . requirements . values ( ) #NEWLINE# buildset = [ ] #NEWLINE# for req in reqset : #NEWLINE# #INDENT# if req . is_wheel : #NEWLINE# #INDENT# if ( not autobuilding ) : #NEWLINE# #INDENT# logger . info ( 'Skipping %s, due to already being wheel.' , req . name ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if req . editable : #NEWLINE# #INDENT# if ( not autobuilding ) : #NEWLINE# #INDENT# logger . info ( 'Skipping bdist_wheel for %s, due to being editable' , req . name ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( autobuilding and req . link and ( not req . link . is_artifact ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( autobuilding and ( not req . source_dir ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if autobuilding : #NEWLINE# #INDENT# link = req . link #NEWLINE# ( base , ext ) = link . splitext ( ) #NEWLINE# if ( pip . index . egg_info_matches ( base , None , link ) is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( 'binary' not in pip . index . fmt_ctl_formats ( self . finder . format_control , pkg_resources . safe_name ( req . name ) . lower ( ) ) ) : #NEWLINE# #INDENT# logger . info ( 'Skipping bdist_wheel for %s, due to binaries being disabled for it.' , req . name ) #NEWLINE# continue #NEWLINE# #UNINDENT# #UNINDENT# buildset . append ( req ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not buildset ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# logger . info ( 'Building wheels for collected packages: %s' , ', ' . join ( [ req . name for req in buildset ] ) ) #NEWLINE# with indent_log ( ) : #NEWLINE# #INDENT# ( build_success , build_failure ) = ( [ ] , [ ] ) #NEWLINE# for req in buildset : #NEWLINE# #INDENT# if autobuilding : #NEWLINE# #INDENT# output_dir = _cache_for_link ( self . _cache_root , req . link ) #NEWLINE# ensure_dir ( output_dir ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output_dir = self . _wheel_dir #NEWLINE# #UNINDENT# wheel_file = self . _build_one ( req , output_dir ) #NEWLINE# if wheel_file : #NEWLINE# #INDENT# build_success . append ( req ) #NEWLINE# if autobuilding : #NEWLINE# #INDENT# if ( req . source_dir and ( not os . path . exists ( os . path . join ( req . source_dir , PIP_DELETE_MARKER_FILENAME ) ) ) ) : #NEWLINE# #INDENT# raise AssertionError ( 'bad source dir - missing marker' ) #NEWLINE# #UNINDENT# req . remove_temporary_source ( ) #NEWLINE# req . source_dir = req . build_location ( self . requirement_set . build_dir ) #NEWLINE# req . link = pip . index . Link ( path_to_url ( wheel_file ) , trusted = True ) #NEWLINE# assert req . link . is_wheel #NEWLINE# unpack_url ( req . link , req . source_dir , None , False , session = self . requirement_set . session ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# build_failure . append ( req ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if build_success : #NEWLINE# #INDENT# logger . info ( 'Successfully built %s' , ' ' . join ( [ req . name for req in build_success ] ) ) #NEWLINE# #UNINDENT# if build_failure : #NEWLINE# #INDENT# logger . info ( 'Failed to build %s' , ' ' . join ( [ req . name for req in build_failure ] ) ) #NEWLINE# #UNINDENT# return ( len ( build_failure ) == 0 )