[Cython] Do we really need realpath()?

Jeroen Demeyer jdemeyer at cage.ugent.be
Wed Oct 28 12:30:54 EDT 2015


I am currently profiling Cython's dependency-checking code when 
compiling the SageMath Cython library. I am skipping the actual 
cythonization, so it's really just the first "for m in module_list" loop 
in cythonize().

I noticed that about 10% of total time is spent in os.path.realpath() 
calls in Cython/Build/Dependencies.py. Do we really need realpath()? 
Isn't abspath() sufficient?

These realpath() calls have been introduced in

commit 1bfd57ef7b1a350135024b19a9352411a952c553
Author: R. Andrew Ohana <andrew.ohana at gmail.com>
Date:   Tue Apr 9 14:03:19 2013 -0700

     copy sources and depends instead of headers


More information about the cython-devel mailing list