# 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(): |
1066 | 1066 | return hash_of_dir('sage') |
1067 | 1067 | |
1068 | 1068 | CYTHON_HASH_FILE='.cython_hash' |
1069 | | H = str(hash_of_cython_file_timestamps()) |
| 1069 | H = str(hash_of_cython_file_timestamps() + hash(os.path.getmtime('setup.py'))) |
1070 | 1070 | if not os.path.exists(CYTHON_HASH_FILE): |
1071 | 1071 | H_old = H + 'x' |
1072 | 1072 | else: |
… |
… |
def create_deps(ext_modules): |
1214 | 1214 | return deps |
1215 | 1215 | |
1216 | 1216 | if not sdist and do_cython: |
| 1217 | import resource |
| 1218 | print "Updating Cython code...." |
| 1219 | u,s = resource.getrusage(resource.RUSAGE_SELF)[:2] |
1217 | 1220 | deps = create_deps(ext_modules) |
1218 | 1221 | 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) |
1220 | 1224 | |
1221 | 1225 | code = setup(name = 'sage', |
1222 | 1226 | |