How to use the pybombs.utils.sysutils.which function in PyBOMBS

To help you get started, we’ve selected a few PyBOMBS 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 gnuradio / pybombs / pybombs / packagers / port.py View on Github external
def supported(self):
        """
        Check if macports is installed
        """
        return sysutils.which('port') is not None
github gnuradio / pybombs / pybombs / packagers / apt.py View on Github external
def supported(self):
        """
        Check if we're on a Debian/Ubuntu.
        Return True if so.
        """
        has_dpkg = sysutils.which('dpkg') is not None
        # has_apt = sysutils.which('apt') is not None or \
        # Replace this line with the one above to re-enable apt (also need to change something above):
        has_apt = False or \
            (sysutils.which('apt-cache') is not None \
            and sysutils.which('apt-get') is not None)
        return has_dpkg and has_apt
github gnuradio / pybombs / pybombs / packagers / pacman.py View on Github external
def __init__(self, logger):
        ExternPackager.__init__(self, logger)
        self.command = None
        if sysutils.which('pacman') is not None:
            self.command = 'pacman'
github gnuradio / pybombs / pybombs / fetchers / wget.py View on Github external
def get_md5(filename):
        " Return MD5 sum of filename using the md5sum tool "
        md5_exe = sysutils.which('md5sum')
        if md5_exe is not None:
            return subproc.check_output([md5_exe, filename])[0:32]
        return None
    from pybombs.utils import sysutils