Ticket #1340 (closed defect: fixed)
[with patch, with positive review] %cython broken if directory name contains spaces
| Reported by: | malb | Owned by: | robertwb |
|---|---|---|---|
| Priority: | major | Milestone: | sage-2.9 |
| Component: | misc | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Try this from the notebook:
%cython def foo(e,f): return e*f
and you'll get:
Traceback (most recent call last):
File "/home/malb/SAGE/local/lib/python2.5/site-packages/sage/server/support.py", line 303, in cython_import_all
create_local_c_file=create_local_c_file)
File "/home/malb/SAGE/local/lib/python2.5/site-packages/sage/server/support.py", line 284, in cython_import
create_local_c_file=create_local_c_file)
File "/home/malb/SAGE/local/lib/python2.5/site-packages/sage/misc/cython.py", line 220, in cython
raise RuntimeError, "Error converting %s to C:\n%s\n%s"%(filename, log, err)
RuntimeError: Error converting /home/malb/Texte/Talks/20071129 - SAGE - Paris/sage_notebook/worksheets/admin/2/code/sage47.spyx to C:
Cython (http://cython.org) is a compiler for code written in the
Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile.pyx ...
Options:
-v, --version Display version number of cython compiler
-l, --create-listing Write error messages to a listing file
-I, --include-dir <directory> Search for include files in named directory
(multiply include directories are allowed).
-o, --output-file <filename> Specify name of generated C file
-p, --embed-positions If specified, the positions in Cython files of each
function definition is embedded in its docstring.
-z, --pre-import <module> If specified, assume undeclared names in this
module. Emulates the behavior of putting
"from <module> import *" at the top of the file.
--incref-local-binop Force local an extra incref on local variables before
performing any binary operations.
-D, --no-docstrings Remove docstrings.
-a, --annotate Produce an colorized version of the source.
Attachments
Change History
comment:2 in reply to: ↑ 1 Changed 5 years ago by malb
- Status changed from new to closed
- Resolution set to invalid
What's with the C: -- looks suspicious.
It's not the driver letter C but, "convert to C" ... and then colon to show what when wrong.
Anyway, I'll invalidate it for now.
comment:3 Changed 5 years ago by malb
- Status changed from closed to reopened
- Resolution invalid deleted
- Summary changed from %cython seriously broken to %cython broken if directory name contains spaces
The problem actually is, that %cython doesn't work well with directory names containing spaces.
comment:4 Changed 5 years ago by robertwb
- Summary changed from %cython broken if directory name contains spaces to [with patch] %cython broken if directory name contains spaces
Note: See
TracTickets for help on using
tickets.


I cannot replicate this at all. %cython works fine for me in sage-2.8.14, at least on osx. and definitely works fine in 2.8.13 in linux. And there has been no change to related code that I can think of.
What's with the C: -- looks suspicious.