Exemplo n.º 1
0
def install():
    """installs the latest built module"""
    tarballs = sorted(path("dist").listdir("*.tar.gz"))
    if not tarballs:
        build()
        tarballs = sorted(path("dist").listdir("*.tar.gz"))
    latest = tarballs[-1]
    shell("easy_install --upgrade %s" % latest)
Exemplo n.º 2
0
def install():
    """installs the latest built module"""
    tarballs = sorted(path("dist").listdir("*.tar.gz"))
    if not tarballs:
        build()
        tarballs = sorted(path("dist").listdir("*.tar.gz"))
    latest = tarballs[-1]
    shell("easy_install --upgrade %s" % latest)
Exemplo n.º 3
0
def clean():
    """cleans all intermediate files"""
    if path("MANIFEST").exists():
        path("MANIFEST").remove()
    if path("build").exists():
        path("build").rmtree()
    if path("dist").exists():
        path("dist").rmtree()
    patterns = ["*.coverage", "*.sqlite", "*.csv", "*.prof", "*.egg-info", "*.so", "*.dll", "*.c", "*.pyc"]
    def recursive_remove_pyc(p):
        for f in p.listdir("*"):
            if f.isdir():
                recursive_remove_pyc(f)
            elif f.endswith(".pyc"):
                f.remove()
    recursive_remove_pyc(path("."))
    for p in patterns:
        for d in [".", "tests", MODULENAME]:
            if path(d).exists():
                for f in path(d).listdir(p):
                    if f.isdir():
                        f.rmtree()
                    else:
                        f.remove()
Exemplo n.º 4
0
def clean():
    """cleans all intermediate files"""
    if path("MANIFEST").exists():
        path("MANIFEST").remove()
    if path("build").exists():
        path("build").rmtree()
    if path("dist").exists():
        path("dist").rmtree()
    patterns = [
        "*.coverage", "*.sqlite", "*.csv", "*.prof", "*.egg-info", "*.so",
        "*.dll", "*.c", "*.pyc"
    ]

    def recursive_remove_pyc(p):
        for f in p.listdir("*"):
            if f.isdir():
                recursive_remove_pyc(f)
            elif f.endswith(".pyc"):
                f.remove()

    recursive_remove_pyc(path("."))
    for p in patterns:
        for d in [".", "tests", MODULENAME]:
            if path(d).exists():
                for f in path(d).listdir(p):
                    if f.isdir():
                        f.rmtree()
                    else:
                        f.remove()