Exemplo n.º 1
0
 def clean(self):
     """By default just runs make clean.  Override if this isn't good."""
     try:
         make = MakeExecutable('make', self.parallel)
         make('clean')
         tty.msg("Successfully cleaned %s" % self.name)
     except subprocess.CalledProcessError, e:
         tty.warn("Warning: 'make clean' didn't work.  Consider 'spack clean --work'.")
Exemplo n.º 2
0
    def fetch_available_versions(self):
        # If not, then try to fetch using list_url
        if not self._available_versions:
            try:
                self._available_versions = find_versions_of_archive(
                    self.url,
                    list_url=self.list_url,
                    list_depth=self.list_depth,
                    wildcard=self.default_version.wildcard())

                if not self._available_versions:
                    tty.warn("Found no versions for %s" % self.name,
                             "Check the list_url and list_depth attribute on the "
                             + self.name + " package.",
                             "Use them to tell Spack where to look for versions.")

            except spack.error.NoNetworkConnectionError, e:
                tty.die("Package.fetch_available_versions couldn't connect to:",
                        e.url, e.message)