Return whether the installation should continue.
00067 : """Return whether the installation should continue.""" # There should be some way for the user to tell specify not to # check dependencies. For example, it probably should not if # the user specified "-q". However, I'm not sure where # distutils stores that information. Also, install has a # --force option that gets saved in self.user_options. It # means overwrite previous installations. If the user has # forced an installation, should we also ignore dependencies? dependencies = [ ("mxTextTools", is_mxTextTools_installed, 1, "http://www.egenix.com/files/python/eGenix-mx-Extensions.html"), ("Numerical Python", is_Numpy_installed, 0, "http://numpy.sourceforge.net/"), ("Reportlab", is_reportlab_installed, 0, "http://www.reportlab.org/downloads.html"), ] for name, is_installed_fn, is_required, url in dependencies: if is_installed_fn(): continue print "*** %s *** is either not installed or out of date." % name if is_required: print """ This package is required for many Biopython features. Please install it before you install Biopython.""" default = 0 else: print """ This package is optional, which means it is only used in a few specialized modules in Biopython. You probably don't need this if you are unsure. You can ignore this requirement, and install it later if you see ImportErrors.""" default = 1 print "You can find %s at %s." % (name, url) print # exit automatically if required packages not installed if not(default): sys.exit(-1) if not get_yes_or_no( "Do you want to continue this installation?", default): return 0 return 1 class install_biopython(install):