Exemplo n.º 1
0
    def __init__(self, installed_dependencies, base_directory):
        assert (isinstance(installed_dependencies, InstalledDependencies))
        assert (base_directory and os.path.isdir(base_directory))

        self.dependencies_directory = base_directory
        self.download_directory = utility.joinPaths(base_directory, TMPDOWNLOAD_DIR_NAME)
        self.extraction_directory = utility.joinPaths(self.download_directory, TMPEXTRACTION_DIR_NAME)

        utility.remove_file_or_dir(self.extraction_directory)
        utility.remove_file_or_dir(self.download_directory)
        utility.ensure_directory(self.download_directory)
        utility.ensure_directory(self.extraction_directory)

        self.installedDependencies = installed_dependencies
Exemplo n.º 2
0
 def __del__(self):
     utility.remove_file_or_dir(self.download_directory)
     utility.remove_file_or_dir(self.extraction_directory)