Beispiel #1
0
def check_name(name):
    if name:
        name = str(name)
    else:
        raise RecipeError("package name missing")
    if not name_pat.match(name) or name.endswith(('.', '-', '_')):
        raise RecipeError("invalid package name '%s'" % name)
    seq = get_bad_seq(name)
    if seq:
        raise RecipeError("'%s' is not allowed in "
                          "package name: '%s'" % (seq, name))
Beispiel #2
0
def check_name(name):
    if name:
        name = str(name)
    else:
        raise RecipeError("package name missing")
    if not name_pat.match(name) or name.endswith(('.', '-', '_')):
        raise RecipeError("invalid package name '%s'" % name)
    seq = get_bad_seq(name)
    if seq:
        raise RecipeError("'%s' is not allowed in "
                          "package name: '%s'" % (seq, name))
Beispiel #3
0
def check_version(ver):
    if ver:
        ver = str(ver)
    else:
        raise RecipeError("package version missing")
    if not version_pat.match(ver):
        raise RecipeError("invalid version '%s'" % ver)
    if ver.startswith(('_', '.')) or ver.endswith(('_', '.')):
        raise RecipeError("version cannot start or end with '_' or '.': %s" %
                          ver)
    seq = get_bad_seq(ver)
    if seq:
        raise RecipeError("'%s' not allowed in version '%s'" % (seq, ver))
Beispiel #4
0
def check_version(ver):
    if ver:
        ver = str(ver)
    else:
        raise RecipeError("package version missing")
    if not version_pat.match(ver):
        raise RecipeError("invalid version '%s'" % ver)
    if ver.startswith(('_', '.')) or ver.endswith(('_', '.')):
        raise RecipeError("version cannot start or end with '_' or '.': %s" %
                          ver)
    seq = get_bad_seq(ver)
    if seq:
        raise RecipeError("'%s' not allowed in version '%s'" % (seq, ver))