Changeset 7617:a973d3d90f93
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r7601 r7617 3 3 push 4 4 pull 5 .cython_hash$ 5 6 \.hi$ 6 7 \.mtl$ -
setup.py
r7605 r7617 1051 1051 sys.exit(1) 1052 1052 return [outfile] 1053 1053 1054 def hash_of_cython_file_timestamps(): 1055 h = 0 1056 extensions = set(['.pyx', '.pxd', '.pxi']) 1057 def hash_of_dir(dir): 1058 h = 0 1059 for f in os.listdir(dir): 1060 z = dir + '/' + f 1061 if os.path.isdir(z): 1062 h += hash_of_dir(z) 1063 elif f[-4:] in extensions: 1064 h += hash(os.path.getmtime(z)) 1065 return h 1066 return hash_of_dir('sage') 1067 1068 CYTHON_HASH_FILE='.cython_hash' 1069 H = str(hash_of_cython_file_timestamps()) 1070 if not os.path.exists(CYTHON_HASH_FILE): 1071 H_old = H + 'x' 1072 else: 1073 H_old = open(CYTHON_HASH_FILE).read() 1074 if H != H_old: 1075 do_cython = True 1076 open(CYTHON_HASH_FILE,'w').write(H) 1077 else: 1078 do_cython = False 1054 1079 1055 1080 def cython(ext_modules): … … 1069 1094 1070 1095 1071 if not sdist :1096 if not sdist and do_cython: 1072 1097 cython(ext_modules) 1073 1098
Note: See TracChangeset
for help on using the changeset viewer.
