Ondrej Certik wrote: > On Thu, Jun 11, 2009 at 10:24 AM, Stefan Behnel<[email protected]> wrote: > >> Ondrej Certik wrote: >> >>> On Thu, Jun 11, 2009 at 1:59 AM, Stefan Behnel wrote: >>> >>>> Ondrej Certik wrote: >>>> >>>>> we use cmake to build the project (C++ and cython) and cmake >>>>> allows to build the project out of the tree, e.g. it leaves the .cpp >>>>> and .py files in the source dir and creates a build dir, where it >>>>> stores all the .o and .so files. >>>>> >>>> Uhm, so the real problem is that cmake fails to take the source directory >>>> structure into account when copying build artefacts over to the build >>>> directory? >>>> >>> I think cmake is doing it right, it only builds binary things in the >>> binary directory and leaves all the sources (be it python or C++) in >>> the source directory. >>> >> Ok, I get it, so all that's missing here to make this work is put either >> the __init__.py files next to the binaries or the binaries next to the >> __init__.py files. >> > > Yes, but putting binaries next to __init__.py files essentially means > building in the tree (then I can just build in the tree from the > beginning, which I do, but other people prefer not to pollute the > build tree), and putting __init__.py files next to binaries doesn't > work for me, because I then have the same module twice in my import > path (once in the source directory, once in the binary directory) and > it clashes -- at least I didn't make it work. > This is the real problem I think. The concept of a build directory is that the result ends up there -- thus, copy over any pure .py files to the build directory, and only have that as the import path.
Really, that's how all out-of-tree builds work? Non-compiled files are copied. I'm against any changes needed only because of a wierd import path setting. Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
