def install(self): """Install the requirements from the given file.""" if self._requirements: return not self._run_command( self._install_command + self._requirements) else: logger.info("No installable requirements found in %s", self.file_path) return False
def remove(self): """Uninstall the requirements from the given file.""" if not self._remove_command: return if self._requirements: self._run_command(self._remove_command + self._requirements) else: logger.info("No removable requirements found in %s", self.file_path)
def _run_command(self, command): logger.info("Executing: %s", command) return check_call(command, shell=isinstance(command, str))