def clean(ctx):
    """Clean previously built package artifacts.
    """
    ctx.run(f"python setup.py clean")
    dist = ROOT.joinpath("dist")
    build = ROOT.joinpath("build")
    print(f"[clean] Removing {dist} and {build}")
    if dist.exists():
        shutil.rmtree(str(dist))
    if build.exists():
        shutil.rmtree(str(build))
Clean previously built package artifacts.