def convert_path(pathname):
if os.sep == '<STR_LIT:/>':<EOL><INDENT>return pathname<EOL><DEDENT>if not pathname:<EOL><INDENT>return pathname<EOL><DEDENT>if pathname[<NUM_LIT:0>] == '<STR_LIT:/>':<EOL><INDENT>raise ValueError("<STR_LIT>" % pathname)<EOL><DEDENT>if pathname[-<NUM_LIT:1>] == '<STR_LIT:/>':<EOL><INDENT>raise ValueError("<STR_LIT>" % pathname)<EOL><DEDENT>paths = pathname.split('<STR_LIT:/>')<EOL>while os.curdir in paths:<EOL><INDENT>paths.remove(os.curdir)<EOL><DEDENT>if not paths:<EOL><INDENT>return os.curdir<EOL><DEDENT>return os.path.join(*paths)<EOL>
Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.