#NEWLINE# def read_package_version( ) : #NEWLINE# #INDENT# version_file = 'pyfora/_version.py' #NEWLINE# with open ( version_file , 'rt' ) as version_file : #NEWLINE# #INDENT# version_line = version_file . read ( ) #NEWLINE# #UNINDENT# match = re . search ( '^__version__ = [\'\\"]([^\'\\"]*)[\'\\"]' , version_line , re . M ) #NEWLINE# if match : #NEWLINE# #INDENT# return match . group ( 1 ) #NEWLINE# #UNINDENT# raise RuntimeError ( ( "Can't read version string from '%s'." % ( match , ) ) )