[Cython] patch for #655

Felix Salfelder felix at salfelder.org
Thu Jun 27 10:26:10 CEST 2013


Hi Stefan.

On Thu, Jun 27, 2013 at 08:58:28AM +0200, Stefan Behnel wrote:
> Make doesn't know that either. Cython at least knows which ones are used
> directly. Handling transitive dependencies would require parsing header
> files. If you need to keep track of changes in transitively included header
> files, why not cimport from them in the Cython source to make them an
> explicit dependency?

explicit dependency tracking would imply "manual". which is painful and
error-prone. without running gcc -M (with all flags) you cannot even
guess the headers used transitively. I haven't found a gcc -M call
within the cython souce code.

> > now what any other compiler will do.

> This sentence barely passes through my English parser and then fails to
> link with the rest.

I'm sorry -- read that as noR [cythonize will know] what any other
compiler will do.

> > i have no idea how
> > to fix that (design flaw?), and its currently easier to just use
> > makefiles from the beginning. with makefiles, dependencies are easy and
> > fast, if all involved compilers support it.
> 
> Maybe you should start by describing more clearly what exactly is missing
> in the current setup. Building with make instead of distutils seems like a
> major complication to me all by itself.

Its still just that "cython does not track (all) build dependencies".
but lets make a short story long:

look at /src/module_list.py within the sage project. it contains lots of
references to headers at hardwired paths. these paths are wrong in most
cases, and they require manual messing with build system internals
*because* cythonize does not (can not?) keep track of them.

building with make (read: autotools) just works the way it always did
(+ some obvious quirks that are not currently included within upstram
autotools) -- after patching cython.

(i know, that many people hate autotools, and i don't want to start a rant
about it, but it would be better for everybody if
a) make/autotools was taken seriously
b) the missing functionality will be implemented into cython(ize) some
   day, start with dependencies, then port/reimplement the AC_* macros )

regards
felix


More information about the cython-devel mailing list