Changeset 8057:20cd22d1b4f7
- Timestamp:
- 01/15/08 14:27:59 (5 years ago)
- Branch:
- default
- Location:
- sage
- Files:
-
- 2 edited
-
misc/cython.py (modified) (3 diffs)
-
server/notebook/cell.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sage/misc/cython.py
r7666 r8057 133 133 134 134 def cython(filename, verbose=False, compile_message=False, 135 use_cache=False, create_local_c_file=False ):135 use_cache=False, create_local_c_file=False, annotate=True, sage_namespace=True): 136 136 if not filename.endswith('pyx'): 137 137 print "File (=%s) should have extension .pyx"%filename … … 218 218 219 219 cython_include = ' '.join(["-I '%s'"%x for x in includes if len(x.strip()) > 0 ]) 220 221 cmd = "cd '%s' && cython -p --incref-local-binop %s '%s.pyx' 1>log 2>err " % (build_dir, cython_include, name) 220 221 options = ['-p', '--incref-local-binop'] 222 if annotate: 223 options.append('-a') 224 if sage_namespace: 225 options.append('--pre-import sage.all') 226 227 cmd = "cd '%s' && cython %s %s '%s.pyx' 1>log 2>err " % (build_dir, ' '.join(options), cython_include, name) 222 228 223 229 if create_local_c_file: … … 226 232 target_c = target_c + "pp" 227 233 cmd += " && cp '%s.c' '%s'"%(name, target_c) 234 if annotate: 235 target_html = '%s/_%s.pyx.html'%(os.path.abspath(os.curdir), base) 236 cmd += " && cp '%s.pyx.html' '%s'"%(name, target_html) 228 237 229 238 if verbose: -
sage/server/notebook/cell.py
r7996 r8057 614 614 pass # jmol data 615 615 else: 616 files.append('<a href="%s" class="file_link">%s</a>'%(url, F)) 616 link_text = str(F) 617 if len(link_text) > 40: 618 link_text = link_text[:10] + '...' + link_text[-20:] 619 files.append('<a href="%s" class="file_link">%s</a>'%(url, link_text)) 617 620 if len(images) == 0: 618 621 images = ''
Note: See TracChangeset
for help on using the changeset viewer.
