Пример #1
0
def pkgfile_from_path(fn):
    pkgname, version = guess_pkgname_and_version(fn)
    return PkgFile(root=py.path.local(fn).parts()[1].strpath,
                   fn=fn,
                   pkgname=pkgname,
                   version=version,
                   parsed_version=parse_version(version))
Пример #2
0
def build_releases(pkg, versions):
    for x in versions:
        parsed_version = core.parse_version(x)
        if parsed_version > pkg.parsed_version:
            yield core.pkgfile(version=x,
                               parsed_version=parsed_version,
                               pkgname=pkg.pkgname,
                               replaces=pkg)
Пример #3
0
def build_releases(pkg, versions):
    for x in versions:
        parsed_version = core.parse_version(x)
        if parsed_version > pkg.parsed_version:
            yield core.pkgfile(version=x,
                               parsed_version=parsed_version,
                               pkgname=pkg.pkgname,
                               replaces=pkg)
Пример #4
0
def test_is_stable_version(version, is_stable):
    parsed_version = parse_version(version)
    assert is_stable_version(parsed_version) == is_stable
Пример #5
0
def pkgfile_from_path(fn):
    pkgname, version = guess_pkgname_and_version(fn)
    return pkgfile(root=py.path.local(fn).parts()[1].strpath,
                   fn=fn, pkgname=pkgname, version=version, parsed_version=parse_version(version))