Ticket #10129: trac_10129-get-systems.patch

File trac_10129-get-systems.patch, 942 bytes (added by jhpalmieri, 12 years ago)
  • sage/misc/citation.pyx

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1287089112 25200
    # Node ID 7d5feddc26ee9df6615baf497279ca2935c43c99
    # Parent  2fe5d13dbea22ec95e71b0b4021fb9d574bf366f
    #10129: avoid false positives in get_systems
    
    diff -r 2fe5d13dbea2 -r 7d5feddc26ee sage/misc/citation.pyx
    a b  
    1 from sage.misc.all import tmp_filename, preparse
     1from sage.misc.all import tmp_filename, preparse, SAGE_ROOT
    22
    33systems = {}
    44systems['PARI'] = ['sage.libs.pari', 'sage.interfaces.gp']
    def get_systems(cmd): 
    7878    stats = pstats.Stats(filename)
    7979
    8080    #Strings is a list of method names and modules which get run
    81     strings = [a[0] + " " + a[2] for a in stats.stats.keys()]
     81    strings = [a[0].replace(SAGE_ROOT, "") + " " + a[2] for a in stats.stats.keys()]
    8282   
    8383    #Remove trivial functions
    8484    bad_res = [re.compile(r'is_.*Element')]