#NEWLINE# def versions_from_parentdir( parentdir_prefix , root , verbose = False ) : #NEWLINE# #INDENT# dirname = os . path . basename ( root ) #NEWLINE# if ( not dirname . startswith ( parentdir_prefix ) ) : #NEWLINE# #INDENT# if verbose : #NEWLINE# #INDENT# print ( ( "guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" % ( root , dirname , parentdir_prefix ) ) ) #NEWLINE# #UNINDENT# return None #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'version' : dirname [ len ( parentdir_prefix ) : ] , #NEWLINE# 'full' : '' , #NEWLINE# #UNINDENT# }