Fix source list trimming in cythonize(...)
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 9 Mar 2011 18:41:27 +0000 (10:41 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 9 Mar 2011 18:41:27 +0000 (10:41 -0800)
Cython/Build/Dependencies.py

index 73b033422f7c9348eb6195ec5b56433943dc9e6e..5ffa2c90dd61e9436e8a148cbaf42b9d92c0701f 100644 (file)
@@ -434,9 +434,12 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None):
                     for key, value in base.values.items():
                         if key not in kwds:
                             kwds[key] = value
+                sources = [file]
+                if template is not None:
+                    sources += template.sources[1:]
                 module_list.append(exn_type(
                         name=module_name,
-                        sources=[file],
+                        sources=sources,
                         **kwds))
                 m = module_list[-1]
                 seen.add(name)