def setup_python3():
    from distutils.filelist import FileList
    from distutils import dir_util, file_util, util, log
    from os.path import join
    tmp_src = join('build', 'src')
    log.set_verbosity(1)
    fl = FileList()
    for line in open('MANIFEST.in'):
        if (not line.strip()):
            continue
        fl.process_template_line(line)
    dir_util.create_tree(tmp_src, fl.files)
    outfiles_2to3 = []
    for f in fl.files:
        (outf, copied) = file_util.copy_file(f, join(tmp_src, f), update=1)
        if (copied and outf.endswith('.py')):
            outfiles_2to3.append(outf)
    util.run_2to3(outfiles_2to3)
    sys.path.insert(0, tmp_src)
    return tmp_src
def setup_python3():
    from distutils.filelist import FileList
    from distutils import dir_util, file_util, util, log
    from os.path import join
    tmp_src = join('build', 'src')
    log.set_verbosity(1)
    fl = FileList()
    for line in open('MANIFEST.in'):
        if (not line.strip()):
            continue
        fl.process_template_line(line)
    dir_util.create_tree(tmp_src, fl.files)
    outfiles_2to3 = []
    for f in fl.files:
        (outf, copied) = file_util.copy_file(f, join(tmp_src, f), update=1)
        if (copied and outf.endswith('.py')):
            outfiles_2to3.append(outf)
    util.run_2to3(outfiles_2to3)
    sys.path.insert(0, tmp_src)
    return tmp_src