Cython has moved to github.
cython-devel
view Cython/Distutils/extension.py @ 4123:9183be31b2cd
Preliminary debug support for Cython
added the --pyrex-debug flag to Cython's build_ext
added the pyrex_debug boolean to Cython's Cython.Distutils.extension.Extension
(for per-module debugging information)
debug output is written to the cython_debug directory
bin/cygdb is included (start this from the build directory)
working commands: cy import, cy locals, cy break
when debugging is active, export all functions as extern
added the --pyrex-debug flag to Cython's build_ext
added the pyrex_debug boolean to Cython's Cython.Distutils.extension.Extension
(for per-module debugging information)
debug output is written to the cython_debug directory
bin/cygdb is included (start this from the build directory)
working commands: cy import, cy locals, cy break
when debugging is active, export all functions as extern
| author | Mark Florisson <markflorisson88@gmail.com> |
|---|---|
| date | Sun Sep 19 00:44:06 2010 +0200 (20 months ago) |
| parents | 120114a86de7 |
| children | a5b7c5a4517e |
line source
1 """Pyrex.Distutils.extension
3 Provides a modified Extension class, that understands hou to describe
4 Pyrex extension modules in setup scripts."""
6 __revision__ = "$Id:$"
8 import os, sys
9 from types import *
10 import distutils.extension as _Extension
12 try:
13 import warnings
14 except ImportError:
15 warnings = None
17 class Extension(_Extension.Extension):
18 _Extension.Extension.__doc__ + \
19 """pyrex_include_dirs : [string]
20 list of directories to search for Pyrex header files (.pxd) (in
21 Unix form for portability)
22 pyrex_directives : {string:value}
23 dict of compiler directives
24 pyrex_create_listing_file : boolean
25 write pyrex error messages to a listing (.lis) file.
26 pyrex_line_directivess : boolean
27 emit pyx line numbers for debugging/profiling
28 pyrex_cplus : boolean
29 use the C++ compiler for compiling and linking.
30 pyrex_c_in_temp : boolean
31 put generated C files in temp directory.
32 pyrex_gen_pxi : boolean
33 generate .pxi file for public declarations
34 pyrex_debug : boolean
35 generate Cython debug information for this extension for cygdb
36 """
38 # When adding arguments to this constructor, be sure to update
39 # user_options.extend in build_ext.py.
40 def __init__ (self, name, sources,
41 include_dirs = None,
42 define_macros = None,
43 undef_macros = None,
44 library_dirs = None,
45 libraries = None,
46 runtime_library_dirs = None,
47 extra_objects = None,
48 extra_compile_args = None,
49 extra_link_args = None,
50 export_symbols = None,
51 #swig_opts = None,
52 depends = None,
53 language = None,
54 pyrex_include_dirs = None,
55 pyrex_directives = None,
56 pyrex_create_listing = 0,
57 pyrex_line_directives = 0,
58 pyrex_cplus = 0,
59 pyrex_c_in_temp = 0,
60 pyrex_gen_pxi = 0,
61 pyrex_debug = False,
62 **kw):
64 _Extension.Extension.__init__(self, name, sources,
65 include_dirs = include_dirs,
66 define_macros = define_macros,
67 undef_macros = undef_macros,
68 library_dirs = library_dirs,
69 libraries = libraries,
70 runtime_library_dirs = runtime_library_dirs,
71 extra_objects = extra_objects,
72 extra_compile_args = extra_compile_args,
73 extra_link_args = extra_link_args,
74 export_symbols = export_symbols,
75 #swig_opts = swig_opts,
76 depends = depends,
77 language = language,
78 **kw)
80 self.pyrex_include_dirs = pyrex_include_dirs or []
81 self.pyrex_directives = pyrex_directives or {}
82 self.pyrex_create_listing = pyrex_create_listing
83 self.pyrex_line_directives = pyrex_line_directives
84 self.pyrex_cplus = pyrex_cplus
85 self.pyrex_c_in_temp = pyrex_c_in_temp
86 self.pyrex_gen_pxi = pyrex_gen_pxi
87 self.pyrex_debug = pyrex_debug
89 # class Extension
91 read_setup_file = _Extension.read_setup_file
