From ea995f722a5b8e1804afdd9e8314f5615a04087f Mon Sep 17 00:00:00 2001 From: Bruno Cornec Date: Tue, 7 Mar 2017 17:43:59 +0100 Subject: [PATCH] Closes-Bug: #1670722 Do not assume that only one script is delivered. Replace by a loop Change-Id: I389d202e61f47761dff88f12e6a63ef4687b513f --- setup.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 5bec6e5..4bdc0c8 100755 --- a/setup.py +++ b/setup.py @@ -70,11 +70,19 @@ class DataFilesHelper(object): self.update_setupstruc(src, dst) try: # Create an entry for scripts if available + self.data['script'] = {'src': [], + 'fdst': [], + 'dst': 'bin'} src = config.get('files', 'scripts').split('\n') - src = [self.refinesrc(file)[0] for file in src if file] - self.data['script'] = {'src': src, - 'dst': 'bin', - 'fdst': self.calculatedst(src, 'bin')} + # print("List handled: {}\n".format(src)) + listsrc = [] + for s in src: + if not s: + continue + # print("Source handled: {}".format(s)) + listsrc.append(s) + self.data['script']['src'] = listsrc + self.data['script']['fdst'] = self.calculatedst(listsrc, "bin") except configparser.NoOptionError: pass pp = pprint.PrettyPrinter(indent=4) @@ -117,7 +125,7 @@ class DataFilesHelper(object): return(file) def calculatedst(self, src, dst): - '''Calculate the full destination path accordind to source and + '''Calculate the full destination path according to source and destination :param src: source files