Пример #1
0
args = sys.argv[1:]


def cmd_in(cmds):
    return any(c in args for c in cmds)


if abspath(dirname(__file__)) != abspath(os.getcwd()):
    logger.error('Please change to ' + dirname(__file__) +
                 ' before running setup.py')
    sys.exit()

if cmd_in(['clean', 'sdist']):
    logger.info('Cleaning up binary files...')
    compile_aligner(logger, only_clean=True)
    compile_glimmer(only_clean=True)
    compile_gage(only_clean=True)
    compile_bwa(only_clean=True)
    compile_bedtools(only_clean=True)
    for fpath in [fn for fn in glob(join(quast_package, '*.pyc'))]:
        os.remove(fpath)
    for fpath in [
            fn for fn in glob(join(quast_package, 'html_saver', '*.pyc'))
    ]:
        os.remove(fpath)
    for fpath in [
            fn
            for fn in glob(join(quast_package, 'site_packages', '*', '*.pyc'))
    ]:
        os.remove(fpath)
Пример #2
0
if 'bdist_wheel' in sys.argv:
    raise RuntimeError(
        "This setup.py does not support wheels. setup.py install will be run automatically..."
    )

if abspath(dirname(__file__)) != abspath(os.getcwd()):
    logger.error('Please change to ' + dirname(__file__) +
                 ' before running setup.py')
    sys.exit()

if cmd_in(['clean', 'sdist']):
    logger.info('Cleaning up binary files...')
    compile_aligner(logger, only_clean=True)
    compile_gnuplot(logger, only_clean=True)
    compile_glimmer(logger, only_clean=True)
    compile_gage(only_clean=True)
    compile_bwa(logger, only_clean=True)
    compile_bedtools(logger, only_clean=True)
    for fpath in [fn for fn in glob(join(quast_package, '*.pyc'))]:
        os.remove(fpath)
    for fpath in [
            fn for fn in glob(join(quast_package, 'html_saver', '*.pyc'))
    ]:
        os.remove(fpath)
    for fpath in [
            fn
            for fn in glob(join(quast_package, 'site_packages', '*', '*.pyc'))
    ]:
        os.remove(fpath)
Пример #3
0
args = sys.argv[1:]


def cmd_in(cmds):
    return any(c in args for c in cmds)


if abspath(dirname(__file__)) != abspath(os.getcwd()):
    logger.error('Please change to ' + dirname(__file__) + ' before running setup.py')
    sys.exit()


if cmd_in(['clean', 'sdist']):
    logger.info('Cleaning up binary files...')
    compile_aligner(logger, only_clean=True)
    compile_glimmer(logger, only_clean=True)
    compile_gage(only_clean=True)
    compile_bwa(logger, only_clean=True)
    compile_bedtools(logger, only_clean=True)
    for fpath in [fn for fn in glob(join(quast_package, '*.pyc'))]: os.remove(fpath)
    for fpath in [fn for fn in glob(join(quast_package, 'html_saver', '*.pyc'))]: os.remove(fpath)
    for fpath in [fn for fn in glob(join(quast_package, 'site_packages', '*', '*.pyc'))]: os.remove(fpath)

    if cmd_in(['clean']):
        if isdir('build'):
            shutil.rmtree('build')
        if isdir('dist'):
            shutil.rmtree('dist')
        if isdir(name + '.egg-info'):
            shutil.rmtree(name + '.egg-info')
        download_manta(logger, only_clean=False)