From 8c9d8b073a3a42bb893459d1596864f65d85962b Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 1 Jun 2009 12:35:22 -0700 Subject: [PATCH] Check dependencies defined for the extension to determine if cython compile is necessary. --- Cython/Distutils/build_ext.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.26.2