(check, sdist)
Build a wheel for a check as it is on the repo HEAD
Build a wheel for a check as it is on the repo HEAD
Build a wheel for a check as it is on the repo HEAD
def build(check, sdist):
    """Build a wheel for a check as it is on the repo HEAD"""
    if check in get_valid_checks():
        check_dir = os.path.join(get_root(), check)
    else:
        check_dir = resolve_path(check)
        if not dir_exists(check_dir):
            abort(f'`{check}` is not an Agent-based Integration or Python package')

        check = basepath(check_dir)

    echo_waiting(f'Building `{check}`...')

    dist_dir = os.path.join(check_dir, 'dist')
    remove_path(dist_dir)

    result = build_package(check_dir, sdist)
    if result.code != 0:
        abort(result.stdout, result.code)

    echo_info(f'Build done, artifact(s) in: {dist_dir}')
    echo_success('Success!')
def build ( check , sdist ) : if check in get_valid_checks ( ) : check_dir = os . path . join ( get_root ( ) , check ) else : check_dir = resolve_path ( check ) if not dir_exists ( check_dir ) : abort ( f'`{check}` is not an Agent-based Integration or Python package' ) check = basepath ( check_dir ) echo_waiting ( f'Building `{check}`...' ) dist_dir = os . path . join ( check_dir , 'dist' ) remove_path ( dist_dir ) result = build_package ( check_dir , sdist ) if result . code != 0 : abort ( result . stdout , result . code ) echo_info ( f'Build done, artifact(s) in: {dist_dir}' ) echo_success ( 'Success!' )