From 1b8a80a81c4a91745a350b3621be108d93dddb20 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Aug 2012 17:34:21 +0200 Subject: do not allow duplicate configure options --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d38321c..1e41f72 100755 --- a/setup.py +++ b/setup.py @@ -837,8 +837,10 @@ class ArgParser(): (opt, arg, i) = (optqueue[i], argqueue[i], i + 1) opt = self.optmap[opt][0] if (opt not in self.opts) or (self.opts[opt] is None): - self.opts[opt] = [] - self.opts[opt].append(arg) + self.opts[opt] = [arg] + else: + sys.stderr.write('%s: fatal: duplicate option %s\n' % (self.__program, arg)) + exit(-1) ''' Prints a colourful help message -- cgit