#NEWLINE# def add_vendor_lib( ) : #NEWLINE# #INDENT# '\n    Adds the vendor library to the front of sys.path.\n\n    ' #NEWLINE# base_dir = os . path . dirname ( os . path . dirname ( os . path . dirname ( os . path . abspath ( __file__ ) ) ) ) #NEWLINE# vendor_lib = os . path . join ( new_sys_path , 'requirements' , 'vendor' , 'lib' , 'python' ) #NEWLINE# orig_sys_path = set ( sys . path ) #NEWLINE# site . addsitedir ( vendor_lib ) #NEWLINE# new_sys_path = [ ] #NEWLINE# for item in list ( sys . path ) : #NEWLINE# #INDENT# if ( item not in orig_sys_path ) : #NEWLINE# #INDENT# new_sys_path . append ( item ) #NEWLINE# sys . path . remove ( item ) #NEWLINE# #UNINDENT# #UNINDENT# sys . path [ : 0 ] = new_sys_path