[Cython] bug in cythonize dependency tracking?

Felix Salfelder felix at salfelder.org
Sun Aug 25 20:54:50 CEST 2013


On Sun, Aug 25, 2013 at 08:08:50PM +0200, Stefan Behnel wrote:
> > This might be a bug, depending on whether cythonize is meant to refresh
> > output files consistently.
> 
> May not really be a bug, but the current dependency tracking has its
> limits, yes.
> 
> Another issue is that it doesn't recompile if you pass different compiler
> options. That's annoying when you want to try out different directives,
> e.g. for benchmarking their impact.

The difference is, a file may get "lost" accidentally (bogus rebase?) or
intentionally (git pull), without the users knowledge. In the
benchmarking case the user knowingly wants to rebuild.

> Both would require some additional tracking of the original compilation
> environment.

Writing out dependency information during the build... btw: please
somebody help complete the -MF patch [1]. Eventually, you might want to
use the created makefiles for dependency tracking.

> OTOH, there's a "force" option (both in distutils and cythonize()) that you
> can use when you know something relevant changed and want to rebuild
> everything.

In huge projects one usually just wants to recompile selectively (per
directory). Is this possible with distutils?

thanks
felix

[1] https://github.com/cython/cython/pull/243


More information about the cython-devel mailing list