#13031: Use cythonize() from cython for Sage module building.
----------------------------------------------------+-----------------------
Reporter: robertwb | Owner:
GeorgSWeber
Type: enhancement | Status: closed
Priority: major | Milestone: sage-5.9
Component: build | Resolution: fixed
Keywords: sd40.5 | Work issues:
Report Upstream: N/A | Reviewers: Jeroen
Demeyer, R. Andrew Ohana
Authors: Robert Bradshaw, R. Andrew Ohana | Merged in:
sage-5.9.beta4
Dependencies: #13029, #13432 | Stopgaps:
----------------------------------------------------+-----------------------
Comment (by leif):
Replying to [comment:72 leif]:
> Also (but this doesn't seem to be the cause), `sage-clone` does not (or
no longer, presumably at least since a while) copy Cython-generated
''header files'' (`*.h`), as these do '''not''' contain a comment on the
first line stating that they were generated by Cython, so the following
doesn't work for them:
> {{{
> #!python
> print "Copying over all Cython auto-generated .c, .cpp and .h files..."
> def cpdir(src, dest):
> if not os.path.isdir(dest):
> return
> for F in os.listdir(src):
> if os.path.isdir(src + '/' + F):
> cpdir(src + '/' + F, dest + '/' + F)
> else:
> ext = os.path.splitext(F)[-1]
> if ext in ['.h', '.c', '.cpp']:
> if 'Cython' in open(src + '/' + F).readline():
> os.link(src + '/' + F, dest + '/' +F)
> os.utime(dest + '/' +F, None)
>
> cpdir(os.path.abspath('sage/sage'), os.path.abspath(branch + '/sage'))
> }}}
Furthermore, the above code doesn't copy the Cython-generated files from
`devel/sage/ext/interpreters/`, so these also get rebuilt, but that goes
back to at least Sage 5.8 (unless I'm missing something).
[[BR]]
If I add copying `.cython_version` to `sage-clone`, besides the above-
mentioned re-"cythonizing"[sic!], many (if not all?) Python modules get
re-byte-compiled, too, for whatever reason... (This doesn't seem to be
related to Cython, but maybe I'm just missing something here as well.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13031#comment:73>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.