From: Eric Huss Date: Mon, 1 Jun 2009 19:35:22 +0000 (-0700) Subject: Check dependencies defined for the extension to determine if cython X-Git-Tag: 0.14.alpha0~355 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8c9d8b073a3a42bb893459d1596864f65d85962b;p=cython.git Check dependencies defined for the extension to determine if cython compile is necessary. --- diff --git a/Cython/Distutils/build_ext.py b/Cython/Distutils/build_ext.py index 652c5a7f..bda917fc 100644 --- a/Cython/Distutils/build_ext.py +++ b/Cython/Distutils/build_ext.py @@ -193,7 +193,8 @@ class build_ext(_build_ext.build_ext): for source in pyrex_sources: target = pyrex_targets[source] - rebuild = self.force or newer(source, target) + depends = [source] + extension.depends + rebuild = self.force or newer_group(depends, target, 'newer') if not rebuild and newest_dependency is not None: rebuild = newer(newest_dependency, target) if rebuild: @@ -209,6 +210,8 @@ class build_ext(_build_ext.build_ext): generate_pxi = pyrex_gen_pxi) result = cython_compile(source, options=options, full_module_name=module_name) + else: + log.info("skipping '%s' Cython extension (up-to-date)", target) return new_sources