sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 478 forks source link

cython spyx files -- cinclude, clib, issues #1994

Closed williamstein closed 7 years ago

williamstein commented 16 years ago

There are some issues with cython spyx files:

  1. There is still nothing in the documentation anywhere in sage about cinclude, clib, etc. Here's a hint:
Basically you put
# clang c
# clib  cblas
# cfile myfile.c
# cinclude "/usr/local/include"

Questions -- where can one put these? Must the # be there?
However this is documented, at a bare minimum typing

sage: cython?
sage: load?
sage: attach?

should give enough information to find docs that clearly explain this cinclude, etc. directives.

  1. Create a file a.pxi and a file b.pyx. Put one of the # directives in the .pxi file and include the pxi file in the pyx file. The directive is ignored. This caused a ton of confusion today.

CC: @malb @robertwb

Component: user interface

Reviewer: Jeroen Demeyer

Issue created by migration from https://trac.sagemath.org/ticket/1994

williamstein commented 16 years ago

Description changed:

--- 
+++ 
@@ -7,7 +7,7 @@
 # clang c
 # clib  cblas
 # cfile myfile.c
-# cinclude super.h standard.h
+# cinclude "/usr/local/include"

Questions -- where can one put these? Must the # be there?
However this is documented, at a bare minimum typing

kedlaya commented 16 years ago
comment:2

Is there also a directive ccflags (analogous to cflags in C)? For instance, in order to compile an spkg using FLINT, one needs a line like

#ccflags -std=c99
85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 16 years ago
comment:3

(1) should have been dealt via #3530, i.e. the documentation of the pragmas.

(2) is potentially still valid and I am not sure whose fault it is: Sage or Cython.

I am adding Martin and Robert to the CC field here.

Cheers,

Michael

malb commented 16 years ago
comment:4

Actually, (1) is not dealt with since it isn't necessarily easy to get to the new documentation. That should be addressed.

kcrisman commented 12 years ago
comment:5

Note that this stackoverflow.com post points to this ticket. Apparently this is still something that could be documented within Sage better?

jdemeyer commented 7 years ago

Reviewer: Jeroen Demeyer

jdemeyer commented 7 years ago
comment:10

Those directives should be deprecated anyway: #22461

embray commented 7 years ago
comment:12

Closing tickets in the sage-duplicate/invalid/wontfix module with positive_review (i.e. someone has confirmed they should be closed).