# HG changeset patch # User Emmanuel Gil Peyrot # Date 1387383021 -3600 # Node ID 53129f3a54af61b8b6d666336e195760a171c2bf # Parent c0b3f8709f74d3670e83cb0c52d42a925aa0a479 Add a debug option to enable HTML annotations, type inference display and profiling. diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -23,6 +23,8 @@ packages = [] 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 @@ setup(name='PyTouhou', 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,