def install(self, update=False): options = self.options location = options['location'] installed = [location] if not update: if os.path.exists(location): shutil.rmtree(location) # We could check with pkg_resources which Zope version we have. # But we support creating instances for 4 only. version = '4' make.make_instance(options.get('user', None), location, version) try: # Make a new zope.conf based on options in buildout.cfg self.build_zope_conf() # Install extra scripts installed.extend(self.install_scripts()) # Add zcml files to package-includes self.build_package_includes() except: # clean up if os.path.exists(location): shutil.rmtree(location) raise if self.scripts: retval = Scripts.install(self) retval.extend(installed) else: retval = installed return retval
def install(self): """Installer""" # XXX Implement recipe functionality here # Return files that were created by the recipe. The buildout # will remove all returned files upon reinstall. return Scripts.install(self)
def install(self, update=False): options = self.options location = options['location'] installed = [location] if not update: if os.path.exists(location): shutil.rmtree(location) # Which Zope2 version do we have? dist = pkg_resources.get_distribution('Zope2') parsed = dist.parsed_version major, minor = parsed[0:2] major = int(major) # We support creating instances for 2.12, 2.13 and 4.0 if major >= 4: major = 2 minor = 13 elif major == 2: minor = int(minor) if minor > 13: minor = 13 version = str(major) + str(minor) make.make_instance(options.get('user', None), location, version) try: # Make a new zope.conf based on options in buildout.cfg self.build_zope_conf() # Install extra scripts installed.extend(self.install_scripts()) # Add zcml files to package-includes self.build_package_includes() except: # clean up if os.path.exists(location): shutil.rmtree(location) raise if self.scripts: retval = Scripts.install(self) retval.extend(installed) else: retval = installed return retval
def install(self, update=False): options = self.options location = options['location'] installed = [location] if not update: if os.path.exists(location): shutil.rmtree(location) # Which Zope2 version do we have? dist = pkg_resources.get_distribution('Zope2') parsed = dist.parsed_version major, minor = parsed[0:2] major = int(major) # We support creating instances for 2.12, 2.13 and 4.0 if major >= 4: major = 2 minor = 13 elif major == 2: minor = int(minor) if minor > 13: minor = 13 version = str(major) + str(minor) make.make_instance(options.get('user', None), location, version) try: # Make a new zope.conf based on options in buildout.cfg self.build_zope_conf() # Install extra scripts installed.extend(self.install_scripts()) # Add zcml files to package-includes self.build_package_includes() except: # clean up if os.path.exists(location): shutil.rmtree(location) raise if self.scripts: retval = Scripts.install(self) retval.extend(installed) else: retval = installed return retval
def install(self, update=False): options = self.options location = options['location'] installed = [location] if not update: if os.path.exists(location): shutil.rmtree(location) # We could check with pkg_resources which Zope version we have. # But we support creating instances for 4 only. version = '4' make.make_instance(options.get('user', None), location, version) try: # Make a new zope.conf and wsgi.ini # based on options in buildout.cfg self.build_zope_conf() if self.wsgi: self.build_wsgi_ini() # Install extra scripts installed.extend(self.install_scripts()) # Add zcml files to package-includes self.build_package_includes() except Exception: # clean up if os.path.exists(location): shutil.rmtree(location) raise if self.scripts: retval = Scripts.install(self) retval.extend(installed) else: retval = installed return retval
def install(self): """Installer""" # XXX Implement recipe functionality here # Return files that were created by the recipe. The buildout # will remove all returned files upon reinstall. return Scripts.install(self)