How to use the pyalpm.version function in pyalpm

To help you get started, we’ve selected a few pyalpm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github manjaro / thus / thus / thus.py View on Github external
def check_pyalpm_version():
    """ Checks python alpm binding and alpm library versions """
    try:
        import pyalpm

        txt = _("Using pyalpm v{0} as interface to libalpm v{1}")
        txt = txt.format(pyalpm.version(), pyalpm.alpmversion())
        logging.info(txt)
    except (NameError, ImportError) as err:
        logging.error(err)
        sys.exit(1)

    return True
github Kwpolska / pkgbuilder / pkgbuilder / wrapper.py View on Github external
def show_version():
    """Show PBWrapper, PKGBUILDer, pacman and pyalpm versions."""
    localdb = DS.pyc.get_localdb()
    pacpkg = localdb.get_pkg('pacman')

    print("""PBWrapper   v{0}
PKGBUILDer  v{1}
pacman      v{2}
pyalpm      v{3}""".format(__wrapperversion__, __version__,
                           pacpkg.version.split('-', 1)[0],
                           pyalpm.version()))
github Antergos / Cnchi / cnchi.tmp / cnchi / cnchi.py View on Github external
def check_pyalpm_version():
    """ Checks python alpm binding and alpm library versions """
    try:
        import pyalpm

        txt = "Using pyalpm v{0} as interface to libalpm v{1}"
        txt = txt.format(pyalpm.version(), pyalpm.alpmversion())
        logging.info(txt)
    except (NameError, ImportError) as err:
        try:
            import show_message as show
            show.error(None, err)
        except ImportError as import_error:
            logging.error(import_error)
        finally:
            logging.error(err)
            return False

    return True