On Thu, Jun 27, 2013 at 1:26 AM, Felix Salfelder <fe...@salfelder.org> wrote: > 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.
Why would it be needed? >> > 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. Ah, I know a bit more here. module_list.py is structured so because it grew up organically by people with a wide range programming backgrounds and one of the explicit goals of cythonize was (among other things) to remove the needs for such explicit and error-prone declarations. module_list.py has not been "simplified" yet because it was a moving target (I think it was rebased something like a dozen times over a period of about a year before we decided to just get cythonize() in and do module_list cleanup later). It should be entirely sufficient, even for sage. > 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. Can you explain? Are you saying you can type cython -M *.pyx make > (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 ) One of the goals of Cythonize is to *only* handle the pyx -> c[pp] step, and let other existing tools handle the rest. - Robert _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel