cython-devel

changeset 3703:219528868027

Check dependencies defined for the extension to determine if cython
compile is necessary.
author Eric Huss <eric@huss.org>
date Mon Jun 01 12:35:22 2009 -0700 (2 years ago)
parents bd9f9a44f71c
children 4b4b0077bd7b
files Cython/Distutils/build_ext.py
line diff
1.1 --- a/Cython/Distutils/build_ext.py Fri Aug 27 18:33:31 2010 +0200 1.2 +++ b/Cython/Distutils/build_ext.py Mon Jun 01 12:35:22 2009 -0700 1.3 @@ -193,7 +193,8 @@ 1.4 1.5 for source in pyrex_sources: 1.6 target = pyrex_targets[source] 1.7 - rebuild = self.force or newer(source, target) 1.8 + depends = [source] + extension.depends 1.9 + rebuild = self.force or newer_group(depends, target, 'newer') 1.10 if not rebuild and newest_dependency is not None: 1.11 rebuild = newer(newest_dependency, target) 1.12 if rebuild: 1.13 @@ -209,6 +210,8 @@ 1.14 generate_pxi = pyrex_gen_pxi) 1.15 result = cython_compile(source, options=options, 1.16 full_module_name=module_name) 1.17 + else: 1.18 + log.info("skipping '%s' Cython extension (up-to-date)", target) 1.19 1.20 return new_sources 1.21