From: crouzet Date: Thu, 6 Dec 2018 16:37:44 +0000 (+0100) Subject: remove filtered products from application python in archive X-Git-Tag: 5.2.0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2a5da9b2658c99c62722f367ee7326213fc11692;p=tools%2Fsat.git remove filtered products from application python in archive --- diff --git a/commands/package.py b/commands/package.py index 3f75bf8..64da2bd 100644 --- a/commands/package.py +++ b/commands/package.py @@ -1040,9 +1040,15 @@ def find_application_pyconf(config, application_tmp_dir): # Prevent from compilation in base application_pyconf_cfg.APPLICATION.no_base = "yes" + #remove products that are not in config (which were filtered by --without_properties) + for product_name in application_pyconf_cfg.APPLICATION.products.keys(): + if product_name not in config.APPLICATION.products.keys(): + application_pyconf_cfg.APPLICATION.products.__delitem__(product_name) + # write the pyconf file to the temporary application location application_tmp_pyconf_path = os.path.join(application_tmp_dir, application_name + ".pyconf") + ff = open(application_tmp_pyconf_path, 'w') ff.write("#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\n") application_pyconf_cfg.__save__(ff, 1)