def query_boost_version(boost_root):
        '''
        Read in the Boost version from a given boost_root.
        '''
        boost_version = None
        if os.path.exists(os.path.join(boost_root,'Jamroot')):
            with codecs.open(os.path.join(boost_root,'Jamroot'), 'r', 'utf-8') as f:
                for line in f.readlines():
                    parts = line.split()
                    if len(parts) >= 5 and parts[1] == 'BOOST_VERSION':
                        boost_version = parts[3]
                        break
        if not boost_version:
            boost_version = 'default'
        return boost_version
Read in the Boost version from a given boost_root.