From 2a5da9b2658c99c62722f367ee7326213fc11692 Mon Sep 17 00:00:00 2001 From: crouzet Date: Thu, 6 Dec 2018 17:37:44 +0100 Subject: [PATCH] remove filtered products from application python in archive --- commands/package.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.2