diff --git a/src/cython_setup.py b/src/cython_setup.py index 6bb2e85..c80f46f 100755 --- a/src/cython_setup.py +++ b/src/cython_setup.py @@ -29,7 +29,7 @@ from distutils.extension import Extension from Cython.Distutils import build_ext import os -to_remove = """cython_setup.py version.py command_line.py""".split() +to_remove = """__init__.py cython_setup.py version.py command_line.py""".split() ext_modules = [] files = os.listdir('.') diff --git a/src/variables.py b/src/variables.py index cf2a409..bc5cf58 100644 --- a/src/variables.py +++ b/src/variables.py @@ -47,8 +47,18 @@ def create_variables(): inside = False icount += 1 v = Variable(buffer,icount) + if v.name in result: + print "Warning: Duplicate provider for %s in"%(v.name) + print "- ", v.line.filename[0], " line ", v.line.i + print "- ", result[v.name].line.filename[0], " line ", result[v.name].line.i + print "Choosing first version" result[v.name] = v for other in v.others: + if other in result: + print "Warning: Duplicate provider for %s in"%(other) + print "- ", v.line.filename[0], " line ", v.line.i + print "- ", result[other].line.filename[0], " line ", result[other].line.i + print "Choosing first version" result[other] = Variable(buffer,icount,other) buffer = [] return result