Ejemplo n.º 1
0
 def _install_potential_package_dependencies(self, path: Path,
                                             feedback: Dict[Path, str]):
     req_path = path / 'requirements.txt'
     if req_path.exists():
         log.info('Checking package dependencies from %s.', req_path)
         if self.autoinstall_deps:
             exc_info = install_packages(req_path)
             if exc_info is not None:
                 typ, value, trace = exc_info
                 feedback[path] = f'{typ}: {value}\n{"".join(traceback.format_tb(trace))}'
         else:
             msg, _ = check_dependencies(req_path)
             if msg and path not in feedback:  # favor the first error.
                 feedback[path] = msg
Ejemplo n.º 2
0
 def _install_potential_package_dependencies(self, path: Path,
                                             feedback: Dict[Path, str]):
     req_path = path / 'requirements.txt'
     if req_path.exists():
         log.info('Checking package dependencies from %s.', req_path)
         if self.autoinstall_deps:
             exc_info = install_packages(req_path)
             if exc_info is not None:
                 typ, value, trace = exc_info
                 feedback[path] = f'{typ}: {value}\n{"".join(traceback.format_tb(trace))}'
         else:
             msg, _ = check_dependencies(req_path)
             if msg and path not in feedback:  # favor the first error.
                 feedback[path] = msg