On Tuesday, October 2, 2018 at 8:54:12 AM UTC-7, Dima Pasechnik wrote:
>
> On Tue, Oct 2, 2018 at 4:44 PM Nathan Dunfield <nat...@dunfield.info 
> <javascript:>> wrote: 
> >> 
> >> It's bad packaging by upstream: it's running Cython but the Cython 
> >> source files are not in the snappy source tarball. 
> > 
> > 
> > Yes, we ship the Cython generated C/C++ files rather than Cython code 
> itself.  My understanding from the Cython docs is that this is the 
> recommended approach for non-Sage packages, and we have always done this. 
>
> Really? Could you point out the place in the docs that recommends this? 
> Letting Cython to do necessary adjustments for the target C/C++ 
> compiler seems like the most natural thing to do... 
>

https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#distributing-cython-modules

The idea is that cython produces fully compliant C code, so that no tuning 
of the generated C code is required. Distributing the cythonized c-files 
has the advantage that the installing user does not need cython installed. 
In sage we have run into trouble with that due to API incompatibilities 
between Py2 and Py3, and it doesn't seem possible to specify the right 
conditionals in the cython file to produce an appropriate c file with the 
right conditional pieces of code in.

Note that the cython documentation recommends to distribute the c files AS 
WELL AS the cython files, and to just not have cythonization as a default 
build option (I'm not sure it always said that). So it seems cython 
recommended practice now is to also include the cython code. With that in 
place, we could just to a cythonizing build in sage (because we'll have 
cython available for sure).

>
> > But apparently we accidentally introduced a bug in the setup.py script 
> in SnapPy 2.6 that is causing it to look for the Cython files anyway... 
> > 
> > Nathan 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sage-devel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to sage-devel+...@googlegroups.com <javascript:>. 
> > To post to this group, send email to sage-...@googlegroups.com 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to