Re: [Cython] Cython distutils does not recompile files if a pxd file changes.
On Sun, Oct 3, 2010 at 11:59 AM, Matěj Laitl <matej <at> laitl.cz> wrote:
> On 3. 10. 2010 Vineet Jain wrote:
>> Not a big deal, but thought I would just mention it. If a pxd file
>> changes and you run setup.py build it will not rebuild the package.
>> You have to change the corresponding pyx file for the module to be
> The reason behind this is that cython.Distutils' build_ext does it's own "is-
> source-newer-than-target" checks. It doesn't parse pyx file for dependencies,
> but it relies on you specifying all dependencies in Extension source files
> declaration, e.g:
> setup(... ext_modules(Extension('module', ['module.pyx', 'module.pxd',
> But I also find it suboptimal.
For sure, especially for a project like Sage. (We had to resort to
managing our dependancies manually...) This was one of the goals of
> Cython distutils can be changed to use cython
> compiler to do dependency mtime checking, I may post a patch in a couple
> of days.
That would be really cool. Note that if you don't amortize this across
multiple files (by doing the dependency resolution for each one
separately) you may find that O(n^2) doesn't grow very nicely :).