def install(self): """Install the requirements from the given file.""" if self._requirements: self._run_command(self._install_command + self._requirements) else: logging.info("No installable requirements found in %s", self.file_path)
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: logging.info("No removable requirements found in %s", self.file_path)
def _run_command(self, command): logging.info("Executing: %s", command) return check_call(command, shell=isinstance(command, str))