def _get_root_versions_dir(config):
 root_dir = _get_package_root_dir(config)
 script_location = config.get_main_option('script_location')
 (part1, part2) = script_location.split(':')
 parts = ((part1.split('.') + part2.split('.')) + ['versions'])
 return os.path.join(root_dir, *parts)

def _get_root_versions_dir ( config ) : root_dir = _get_package_root_dir ( config ) script_location = config . get_main_option ( 'script_location' ) ( part1 , part2 ) = script_location . split ( ':' ) parts = ( ( part1 . split ( '.' ) + part2 . split ( '.' ) ) + [ 'versions' ] ) return os . path . join ( root_dir , * parts )
return root directory that contains all migration rules .