This actually isn't the cython compiler code, it's in the Sage
library. I'm actually not sure what the goal was here with the
clean_filename stuff (didn't write it myself, and I'm wary of
changing it because I'm guessing there was some reason to do it this
way)...
- Robert
On Mar 4, 2008, at 11:32 AM, William Stein wrote:
> Hi,
>
> I'm forwarding this message from sage-support to Cython-devel, where
> it points out a probable bug in the Cython compiler (with fix).
>
> -- william (from Sage Days 8)
>
> ---------- Forwarded message ----------
> From: Kate <[EMAIL PROTECTED]>
> Date: Tue, Mar 4, 2008 at 10:44 AM
> Subject: [sage-support] cython and filenames
> To: sage-support <[EMAIL PROTECTED]>
>
>
>
> Here is a snippet of code from cython.py in the main tree
> (SAGE_ROOT/devel/sage/sage/misc/cython.py)
>
> def cython(filename, verbose=False, compile_message=False,
> use_cache=False, create_local_c_file=False, annotate=True,
> sage_namespace=True):
> if not filename.endswith('pyx'):
> print "File (=%s) should have extension .pyx"%filename
>
> clean_filename = sanitize(filename)
> ====> base = os.path.split(os.path.splitext(clean_filename)[0])[1]
> ====> abs_base =
> os.path.abspath(os.path.split(os.path.splitext(clean_filename)[0])
> [0])
>
> It seems to me that the marked lines, in addition to being
> hard to parse, do not have the intended effect. This is
> because in the creation of clean_filename, the call to
> the sanitize function converts all slashes and dots into
> underscores, which are not 'picked up' by the calls to
> the os.path.* functions.
>
> Is this really what is intended?
>
> Kate
>
> --~--~---------~--~----~------------~-------~--~----~
> To post to this group, send email to [EMAIL PROTECTED]
> To unsubscribe from this group, send email to
> [EMAIL PROTECTED]
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URLs: http://www.sagemath.org
> -~----------~----~----~----~------~----~------~--~---
>
>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://wstein.org
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev