Commits

Denis Bilenko  committed affdee2

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

turns out os.stat(..).st_mtime is float

  • Participants
  • Parent commits 7b6b16e

Comments (0)

Files changed (1)

             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')