def run(self, args, **kwargs): log.debug("Running '{0}' in {1}".format(' '.join(args), self.name)) # mpiexec removes quotes from command line args, so escaping the quotes in the command escaped_args = [arg.replace('"', '\\"') for arg in args] executable, *args = self.activate_mpi('python', escaped_args) return self.run_executable(executable, args, **kwargs)
def run(self, args, *, env=None, **kwargs): # pylint: disable=arguments-differ # unfortunately, this has to use asv.util.check_*, because of the kwargs heavily used by # asv.runner, and those kwargs are incompatible with subprocess log.debug('Running {!r} in {}'.format(args, self.name)) return asv.util.check_output([self._executable, *args], env=self._get_env_for_subprocess(env), **kwargs)
def _build_project(self, repo, commit_hash, build_dir): # at "build" time, we build the environment from the provided lockfile self.run_executable( _find_conda(), [ "install", "-y", "-p", self._path, "--file", f"{build_dir}/{self._lockfile_path}", ], ) log.info( f"Environment {self.name} updated to spec at {commit_hash[:8]}" ) log.debug( self.run_executable(_find_conda(), ["list", "-p", self._path]) ) return super()._build_project(repo, commit_hash, build_dir)