Ticket #2180: sage-2180.patch

File sage-2180.patch, 1.2 KB (added by was, 15 years ago)

this might (?) completely fix the bug; it also adds some nice timing output

  • setup.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1203829829 28800
    # Node ID b966ff285cc7edd4b9f6daa706f2f17067be4149
    # Parent  4c83347b91e16c6924419f6905c34cf7da5b2d50
    trac #2180 -- bug in cython skipping (build optimization); plus add some timing output
    
    diff -r 4c83347b91e1 -r b966ff285cc7 setup.py
    a b def hash_of_cython_file_timestamps(): 
    10661066    return hash_of_dir('sage')
    10671067
    10681068CYTHON_HASH_FILE='.cython_hash'
    1069 H = str(hash_of_cython_file_timestamps())
     1069H = str(hash_of_cython_file_timestamps() + hash(os.path.getmtime('setup.py')))
    10701070if not os.path.exists(CYTHON_HASH_FILE):
    10711071    H_old = H + 'x'
    10721072else:
    def create_deps(ext_modules): 
    12141214    return deps
    12151215
    12161216if not sdist and do_cython:
     1217    import resource
     1218    print "Updating Cython code...."
     1219    u,s = resource.getrusage(resource.RUSAGE_SELF)[:2]
    12171220    deps = create_deps(ext_modules)
    12181221    cython(deps, ext_modules)
    1219     pass
     1222    uu,ss = resource.getrusage(resource.RUSAGE_SELF)[:2]
     1223    print "Finished updating Cython code (time = %s seconds)"%(uu+ss-u-s)
    12201224
    12211225code = setup(name        = 'sage',
    12221226