X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=commands%2Fconfigure.py;h=2bf068b83dd97f1d0296d83879431c25c66664ac;hb=107552854ce17709e5953955d2514079a72035e6;hp=2fe672c9662bfddf46e5cc82a38e4fc91ba72399;hpb=941eef63102ae0968d7133997c76b34d53457612;p=tools%2Fsat.git diff --git a/commands/configure.py b/commands/configure.py index 2fe672c..2bf068b 100644 --- a/commands/configure.py +++ b/commands/configure.py @@ -23,43 +23,10 @@ import src # Define all possible option for configure command : sat configure parser = src.options.Options() parser.add_option('p', 'products', 'list2', 'products', - _('products to configure. This option can be' - ' passed several time to configure several products.')) + _('Optional: products to configure. This option accepts a comma separated list.')) parser.add_option('o', 'option', 'string', 'option', - _('Option to add to the configure or cmake command.'), "") + _('Optional: Option to add to the configure or cmake command.'), "") -def get_products_list(options, cfg, logger): - '''method that gives the product list with their informations from - configuration regarding the passed options. - - :param options Options: The Options instance that stores the commands - arguments - :param cfg Config: The global configuration - :param logger Logger: The logger instance to use for the display and logging - :return: The list of (product name, product_informations). - :rtype: List - ''' - # Get the products to be prepared, regarding the options - if options.products is None: - # No options, get all products sources - products = cfg.APPLICATION.products - else: - # if option --products, check that all products of the command line - # are present in the application. - products = options.products - for p in products: - if p not in cfg.APPLICATION.products: - raise src.SatException(_("Product %(product)s " - "not defined in application %(application)s") % - { 'product': p, 'application': cfg.VARS.application} ) - - # Construct the list of tuple containing - # the products name and their definition - products_infos = src.product.get_products_infos(products, cfg) - - products_infos = [pi for pi in products_infos if not(src.product.product_is_native(pi[1]) or src.product.product_is_fixed(pi[1]))] - - return products_infos def log_step(logger, header, step): logger.write("\r%s%s" % (header, " " * 20), 3) @@ -177,11 +144,12 @@ def description(): :rtype: str ''' return _("The configure command executes in the build directory" - " the configure commands corresponding to the compilation mode" + " the configure commands corresponding\nto the compilation mode" " of the application products.\nThe possible compilation modes" " are \"cmake\", \"autotools\", or a script.\n\nHere are the " "commands to be run :\nautotools: build_configure and configure\n" - "cmake: cmake\nscript: N\A") + "cmake: cmake\nscript: do nothing\n\nexample:\nsat configure " + "SALOME-master --products KERNEL,GUI,PARAVIS") def run(args, runner, logger): '''method that is called when salomeTools is called with make parameter. @@ -194,7 +162,7 @@ def run(args, runner, logger): src.check_config_has_application( runner.cfg ) # Get the list of products to treat - products_infos = get_products_list(options, runner.cfg, logger) + products_infos = src.product.get_products_list(options, runner.cfg, logger) # Print some informations logger.write(_('Configuring the sources of the application %s\n') %