def install(self, package): logger.debug("Installing GitPlugin") #wget http://trac-hacks.org/changeset/latest/gitplugin?old_path=/&filename=gitplugin&format=zip extracted_dir = package.extract(self.config.genforma_home) logger.debug("Extracted directory is: " + extracted_dir) #extract zip file #python setup.py install --prefix=pythonpath setup_script_dir = iupath.join_list([self.config.genforma_home, extracted_dir, "0.11"]) setup_script = os.path.join(setup_script_dir, "setup.py") # must run setup from the setup script directory rc = iuprocess.run_and_log_program([self.config.input_ports.python.home, setup_script, "install"], {}, logger, cwd=setup_script_dir) if rc != 0: raise UserError(errors[ERR_GITPLUGIN], developer_msg="Python setup failed"); logger.debug("Done installing GitPlugin")
def install(self, package): logger.debug("Installing %s" % self.package_name) extracted_dir = package.extract(self.config.genforma_home) logger.debug("Extracted directory is: " + extracted_dir) # if there is a patch, install it now if self._has_patch(): self._install_patch(os.path.join(self.config.genforma_home, extracted_dir)) #python setup.py install --prefix=pythonpath setup_script_dir = iupath.join_list([self.config.genforma_home, extracted_dir, self.trac_version]) setup_script = os.path.join(setup_script_dir, "setup.py") args = [self.config.input_ports.python.home, setup_script, "install"] # must run setup from the setup script directory rc = iuprocess.run_and_log_program(args, {},logger, cwd=setup_script_dir) if rc != 0: raise UserError(errors[ERR_TRAC_PLUGIN_SETUP], msg_args={'plugin': self.package_name}, developer_msg=' '.join(args)) logger.debug("Done installing %s" % self.package_name)