changeset 521:53129f3a54af

Add a debug option to enable HTML annotations, type inference display and profiling.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 17:10:21 +0100
parents c0b3f8709f74
children e8496e5ba056
files setup.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Thu Dec 12 13:15:43 2013 +0100
+++ b/setup.py	Wed Dec 18 17:10:21 2013 +0100
@@ -23,6 +23,8 @@
 extension_names = []
 extensions = []
 
+debug = False  # True to generate HTML annotations and display infered types.
+
 
 # Check for gl.pc, and don’t compile the OpenGL backend if it isn’t present.
 try:
@@ -112,9 +114,10 @@
       url='http://pytouhou.linkmauve.fr/',
       license='GPLv3',
       packages=packages,
-      ext_modules=cythonize(extensions, nthreads=4,
+      ext_modules=cythonize(extensions, nthreads=4, annotate=debug,
                             compiler_directives={'infer_types': True,
-                                                 'infer_types.verbose': True},
+                                                 'infer_types.verbose': debug,
+                                                 'profile': debug},
                             compile_time_env={'MAX_TEXTURES': 128,
                                               'MAX_ELEMENTS': 640 * 4 * 3,
                                               'MAX_CHANNELS': 26,