On 9 June 2010 21:07, Chuck Blake <[email protected]> wrote:
> Lisandro Dalcin wrote:
>>Looks fine. Could you generate the patch with hg export and send it attached?
>
> Done.  It's attached.
>
> I sent this message earlier for you, but it does not appear to have made it
> through the system.
>
> Attribution as "Chuck Blake" <[email protected]> is fine, Lisandro.
>

Could you double check the attached hg export patch? I noticed your
original patch did not have the addition of 'pyrex_line_directives' to
the argument list of the 'Extension' __init__ method... Could you
please actually check the attached patch? It is almost all yours, plus
my fix adding the arg to Extension.__init__



-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
# HG changeset patch
# User Chuck Blake <[email protected]>
# Date 1276180601 10800
# Node ID 16bbddac0bf8f95d2dd29d54ea41f5901d86d0ef
# Parent  dd29215de4a0930a7bb8e15d8dd293eedc82f5ba
Add control of --line-directives to Distutils build_ext

diff -r dd29215de4a0 -r 16bbddac0bf8 Cython/Distutils/build_ext.py
--- a/Cython/Distutils/build_ext.py	Mon Jun 07 11:06:45 2010 -0700
+++ b/Cython/Distutils/build_ext.py	Thu Jun 10 11:36:41 2010 -0300
@@ -36,6 +36,8 @@
          "generate C++ source files"),
         ('pyrex-create-listing', None,
          "write errors to a listing file"),
+        ('pyrex-line-directives', None,
+         "emit source line directives"),
         ('pyrex-include-dirs=', None,
          "path to the Cython include files" + sep_by),
         ('pyrex-c-in-temp', None,
@@ -45,13 +47,14 @@
         ])
 
     boolean_options.extend([
-        'pyrex-cplus', 'pyrex-create-listing', 'pyrex-c-in-temp'
+        'pyrex-cplus', 'pyrex-create-listing', 'pyrex-line-directives', 'pyrex-c-in-temp'
     ])
 
     def initialize_options(self):
         _build_ext.build_ext.initialize_options(self)
         self.pyrex_cplus = 0
         self.pyrex_create_listing = 0
+        self.pyrex_line_directives = 0
         self.pyrex_include_dirs = None
         self.pyrex_c_in_temp = 0
         self.pyrex_gen_pxi = 0
@@ -114,6 +117,8 @@
         
         create_listing = self.pyrex_create_listing or \
             getattr(extension, 'pyrex_create_listing', 0)
+        line_directives = self.pyrex_line_directives or \
+            getattr(extension, 'pyrex_line_directives', 0)
         cplus = self.pyrex_cplus or getattr(extension, 'pyrex_cplus', 0) or \
                 (extension.language and extension.language.lower() == 'c++')
         pyrex_gen_pxi = self.pyrex_gen_pxi or getattr(extension, 'pyrex_gen_pxi', 0)
@@ -186,6 +191,7 @@
                     include_path = includes,
                     output_file = target,
                     cplus = cplus,
+                    emit_linenums = line_directives,
                     generate_pxi = pyrex_gen_pxi)
                 result = cython_compile(source, options=options,
                                         full_module_name=module_name)
diff -r dd29215de4a0 -r 16bbddac0bf8 Cython/Distutils/extension.py
--- a/Cython/Distutils/extension.py	Mon Jun 07 11:06:45 2010 -0700
+++ b/Cython/Distutils/extension.py	Thu Jun 10 11:36:41 2010 -0300
@@ -21,6 +21,8 @@
         Unix form for portability)
     pyrex_create_listing_file : boolean
         write pyrex error messages to a listing (.lis) file.
+    pyrex_line_directivess : boolean
+        emit pyx line numbers for debugging/profiling
     pyrex_cplus : boolean
         use the C++ compiler for compiling and linking.
     pyrex_c_in_temp : boolean
@@ -47,6 +49,7 @@
             language = None,
             pyrex_include_dirs = None,
             pyrex_create_listing = 0,
+            pyrex_line_directives = 0,
             pyrex_cplus = 0,
             pyrex_c_in_temp = 0,
             pyrex_gen_pxi = 0,
@@ -70,6 +73,7 @@
 
         self.pyrex_include_dirs = pyrex_include_dirs or []
         self.pyrex_create_listing = pyrex_create_listing
+        self.pyrex_line_directives = pyrex_line_directives
         self.pyrex_cplus = pyrex_cplus
         self.pyrex_c_in_temp = pyrex_c_in_temp
         self.pyrex_gen_pxi = pyrex_gen_pxi
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to