Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def _run_command(self, command):
     logging.info("Executing: %s", command)
     return check_call(command, shell=isinstance(command, str))