| 1 | # HG changeset patch |
|---|
| 2 | # User Eric Huss <eric@huss.org> |
|---|
| 3 | # Date 1243884922 25200 |
|---|
| 4 | # Node ID ca95113af5b4ce3a36ee0bc023681db05ba01d26 |
|---|
| 5 | # Parent 88fa346e169d202affa38db4cf5472b33fd82626 |
|---|
| 6 | Check dependencies defined for the extension to determine if cython |
|---|
| 7 | compile is necessary. |
|---|
| 8 | |
|---|
| 9 | diff -r 88fa346e169d -r ca95113af5b4 Cython/Distutils/build_ext.py |
|---|
| 10 | --- a/Cython/Distutils/build_ext.py Tue May 26 22:54:46 2009 +0200 |
|---|
| 11 | +++ b/Cython/Distutils/build_ext.py Mon Jun 01 12:35:22 2009 -0700 |
|---|
| 12 | @@ -181,7 +181,8 @@ |
|---|
| 13 | |
|---|
| 14 | for source in pyrex_sources: |
|---|
| 15 | target = pyrex_targets[source] |
|---|
| 16 | - rebuild = self.force or newer(source, target) |
|---|
| 17 | + depends = [source] + extension.depends |
|---|
| 18 | + rebuild = self.force or newer_group(depends, target, 'newer') |
|---|
| 19 | if not rebuild and newest_dependency is not None: |
|---|
| 20 | rebuild = newer(newest_dependency, target) |
|---|
| 21 | if rebuild: |
|---|
| 22 | @@ -195,6 +196,8 @@ |
|---|
| 23 | generate_pxi = pyrex_gen_pxi) |
|---|
| 24 | result = cython_compile(source, options=options, |
|---|
| 25 | full_module_name=module_name) |
|---|
| 26 | + else: |
|---|
| 27 | + log.info("skipping '%s' Cython extension (up-to-date)", target) |
|---|
| 28 | |
|---|
| 29 | return new_sources |
|---|
| 30 | |
|---|