def extract_versions():
 with open('lib/matplotlib/__init__.py') as fd:
  for line in fd.readlines():
   if line.startswith('__version__numpy__'):
    exec line.strip()
 return locals()

def extract_versions ( ) : with open ( 'lib/matplotlib/__init__.py' ) as fd : for line in fd . readlines ( ) : if line . startswith ( '__version__numpy__' ) : exec line . strip ( ) return locals ( )
extracts version values from the main matplotlib __init__ .