def relpath_to_config_or_make(filename):
 prefix = _find_prefix(filename)
 return os.path.relpath(os.path.dirname(filename), prefix)

def relpath_to_config_or_make ( filename ) : prefix = _find_prefix ( filename ) return os . path . relpath ( os . path . dirname ( filename ) , prefix )
the following is refactored out of hook-sysconfig and hook-distutils .