#NEWLINE# def build( self , conanfile_path , current_path , test = False , filename = None ) : #NEWLINE# #INDENT# ' Call to build() method saved on the conanfile.py\n        param conanfile_path: the original source directory of the user containing a\n                            conanfile.py\n        ' #NEWLINE# logger . debug ( ( 'Building in %s' % current_path ) ) #NEWLINE# logger . debug ( ( 'Conanfile in %s' % conanfile_path ) ) #NEWLINE# if ( filename and filename . endswith ( '.txt' ) ) : #NEWLINE# #INDENT# raise ConanException ( "A conanfile.py is needed to call 'conan build'" ) #NEWLINE# #UNINDENT# conanfile_file = os . path . join ( conanfile_path , ( filename or CONANFILE ) ) #NEWLINE# try : #NEWLINE# #INDENT# output = ScopedOutput ( 'Project' , self . _user_io . out ) #NEWLINE# conan_file = self . _loader ( current_path ) . load_conan ( conanfile_file , output , consumer = True ) #NEWLINE# #UNINDENT# except NotFoundException : #NEWLINE# #INDENT# raise ConanException ( ( "'%s' file is needed for build.\nCreate a '%s' and move manually the requirements and generators from '%s' file" % ( CONANFILE , CONANFILE , CONANFILE_TXT ) ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# build_info_file = os . path . join ( current_path , BUILD_INFO ) #NEWLINE# if os . path . exists ( build_info_file ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# deps_cpp_info = DepsCppInfo . loads ( load ( build_info_file ) ) #NEWLINE# conan_file . deps_cpp_info = deps_cpp_info #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# os . chdir ( current_path ) #NEWLINE# conan_file . _conanfile_directory = conanfile_path #NEWLINE# conan_file . build ( ) #NEWLINE# if test : #NEWLINE# #INDENT# conan_file . test ( ) #NEWLINE# #UNINDENT# #UNINDENT# except ConanException : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# import traceback #NEWLINE# trace = traceback . format_exc ( ) . split ( '\n' ) #NEWLINE# raise ConanException ( ( 'Unable to build it successfully\n%s' % '\n' . join ( trace [ 3 : ] ) ) )