[Cython] Why does embed-position use relative filenames?

Jeroen Demeyer jdemeyer at cage.ugent.be
Wed Oct 25 08:24:48 EDT 2017


When Cython is run with the --embed-position option (or when 
Cython.Compiler.Options.embed_pos_in_docstring is true), Cython writes 
headers in the docstring like

File: sage/rings/integer.pyx (starting at line 358)

The filenames that Cython uses here are always made relative to the 
current working directory. This is annoying for tools which extract this 
information for introspection. It would be more useful to just write the 
path as-is instead of making it relative.

It would be easy to change this behaviour in Cython but I was wondering 
if there is a specific reason for these relative paths.


More information about the cython-devel mailing list