Ticket #13881: trac_13881_cython_debug_symbols.patch

File trac_13881_cython_debug_symbols.patch, 1.1 KB (added by vbraun, 7 years ago)

Updated patch

  • .hgignore

    # HG changeset patch
    # User Volker Braun <vbraun.name@gmail.com>
    # Date 1356814995 0
    # Node ID bf47f1a2c33fb66b70680d9ca87635cf88d3f9ec
    # Parent  3bf6ba30b4270d4105d5e203ee672824f0b70b2a
    Make Cython emit debugging information (unless SAGE_DEBUG=no).
    
    diff --git a/.hgignore b/.hgignore
    a b  
    3939PKG-INFO
    4040build
    4141dist
     42cython_debug
    4243sage/.*\.c$
    4344sage/.*\.cpp$
    4445c_lib/.*\.lo$
  • setup.py

    diff --git a/setup.py b/setup.py
    a b  
    738738            outfile += ".c"
    739739            cplus = ''
    740740
     741        if os.environ.get('SAGE_DEBUG', None)=='no':
     742            debug = ''
     743        else:
     744            debug = '--gdb'
     745
    741746        # call cython, abort if it failed
    742         cmd = "python `which cython` %s --old-style-globals --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I%s -o %s %s"%(cplus, os.getcwd(), outfile, f)
     747        cmd = "cython %s %s --old-style-globals --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I%s -o %s %s"%(debug, cplus, os.getcwd(), outfile, f)
    743748        r = run_command(cmd)
    744749        if r:
    745750            return r