Commit bf7c0d71 authored by Denis Bilenko's avatar Denis Bilenko

setup.py: avoid false positives when calculation if core.c needs regenerating

turns out os.stat(..).st_mtime is float
parent ba30c465
......@@ -43,7 +43,7 @@ class my_build_ext(build_ext.build_ext):
print >> sys.stderr, 'Could not find gevent.core sources'
return
core_c_mtime = os.stat('gevent/core.c').st_mtime
changed = [filename for filename in sources if os.stat(filename).st_mtime > core_c_mtime]
changed = [filename for filename in sources if (os.stat(filename).st_mtime - core_c_mtime) > 1]
if changed:
print >> sys.stderr, 'Running cython (changed: %s)' % ', '.join(changed)
cython_result = os.system('cython gevent/core.pyx')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment