Hi Dima,
On 2019-09-24, Dima Pasechnik <
dim...@gmail.com> wrote:
> Shouldn't coexisting installations like this have different --prefix ?
Of course. But if I understand correctly, this only affects where stuff
is installed, not where it is built. The situation is as follows:
- the .c files are created in the source directory, i.e., where the
corresponding .pyx files live. Therefore the .c files are only
re-generated when the .pyx file is touched, but not when the language
level changes.
- the .so files are created in build/lib.linux-x86_64-2.7 resp. -3.7,
hence, the paths do take into account the language level. This is of
course a good idea, but not enough (because of the .c files).
- eventually the .so files are installed in --prefix.
The .c file can very well depend on the language level. E.g., in the Sage
library, compile time variables are used to tell Cython what code to
use for py2 and what code for py3.
Hence, IMHO it is clearly a bug that the .c files are not by default
created in a path that depends on the language level.
But I don't know where that bug should be reported.
Best regards,
Simon