def install(self): """ """ self.logger.info("Installing %s" % self.virtualenv) sysdeps.create_virtualenv( self.logger, self.virtualenv_cmd, self.virtualenv, egg_spec="docutils==0.8.1", py3=self.python3k ) sysdeps.run_virtualenv_command(self.logger, self.virtualenv, "easy_install Pygments", raise_error=True)
def run_virtualenv_command(self, cmd, raise_error=False): """ Run cmd under host Python or our own virtualenv """ if self.host_python: return utils.shell(self.logger, cmd, raise_error=raise_error) else: return sysdeps.run_virtualenv_command(self.logger, self.virtualenv, cmd, raise_error=raise_error)
def validate(self, fname): """ Run .rst against our custom validation script. """ exitcode, output = sysdeps.run_virtualenv_command(self.logger, self.virtualenv, "vvv-validate-rst %s" % fname) if exitcode != 0: self.reporter.report_unstructured(self.id, output, fname=fname) return False return True
def validate(self, fname): """ Run .rst against our custom validation script. """ binloc = os.path.join(sysdeps.get_bin_path(), "vvv-validate-rst") exitcode, output = sysdeps.run_virtualenv_command(self.logger, self.virtualenv, "%s %s" % (binloc, fname)) if exitcode != 0: self.reporter.report_unstructured(self.id, output, fname=fname) return False return True
def validate(self, fname): """ Run .rst against our custom validation script. """ binloc = os.path.join(sysdeps.get_bin_path(), "vvv-validate-rst") exitcode, output = sysdeps.run_virtualenv_command( self.logger, self.virtualenv, "%s %s" % (binloc, fname)) if exitcode != 0: self.reporter.report_unstructured(self.id, output, fname=fname) return False return True