More extendable Setup.py
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 26 Apr 2008 18:28:35 +0000 (11:28 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 26 Apr 2008 18:28:35 +0000 (11:28 -0700)
Cython/Compiler/ModuleNode.py
Demos/Setup.py

index 9eed6d2cf83f209ee4b973f67bf3e15e07519d40..e569e4d3ce6265815c0c019a09584c143411cacc 100644 (file)
@@ -690,7 +690,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         for entry in scope.var_entries:
             if entry.type.is_pyobject and entry is not weakref_slot:
                 py_attrs.append(entry)
-        print py_attrs
         if py_attrs or weakref_slot in scope.var_entries:
             self.generate_self_cast(scope, code)
         self.generate_usr_dealloc_call(scope, code)
index 18e05820ba4c7686d7e3f74fcf0f12734596e0f2..75b05af0fce37948d547cb1fb88ae7303ba7712c 100644 (file)
@@ -1,31 +1,20 @@
+import glob
+
 from distutils.core import setup
 from distutils.extension import Extension
 from Cython.Distutils import build_ext
 
-setup(
-  name = 'Demos',
-  ext_modules=[ 
+ext_modules=[ 
     Extension("primes",       ["primes.pyx"]),
     Extension("spam",         ["spam.pyx"]),
-#    Extension("numeric_demo", ["numeric_demo.pyx"]),
-    Extension("test", ["test.pyx"]),
-    Extension("func_pointers", ["func_pointers.pyx"]),
-#    Extension("inplace", ["inplace.pyx"]),
-#    Extension("withGIL", ["withGIL.pyx"]),
-    Extension("class_members", ["class_members.pyx"]),
-#    Extension("inherit_bug", ["inherit_bug.pyx"]),
-    Extension("override", ["override.pyx"]),
-    Extension("cond", ["cond.pyx"]),
-#    Extension("submodule.test",       ["submodule/test.pyx"]),
-    Extension("errors",       ["errors.pyx"]),
-    Extension("cpdef",       ["cpdef.pyx"]),
-    Extension("range",       ["range.pyx"]),
-    Extension("early_temps",       ["early_temps.pyx"]),
-    Extension("ints",       ["ints.pyx"]),
-    Extension("clear",       ["clear.pyx"]),
-    Extension("detect_override",       ["detect_override.pyx"]),
-    Extension("fixes",       ["fixes.pyx"]),
-    ],
+]
+
+for file in glob.glob("*.pyx"):
+    if file != "numeric_demo.pyx":
+        ext_modules.append(Extension(file[:-4], [file]))
+
+setup(
+  name = 'Demos',
   cmdclass = {'build_ext': build_ext},
-#  include_dirs = "/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/"
+  ext_modules = ext_modules,
 )