Re: What to do about sagemath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 5, 2018 at 2:48 AM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
> How can I help with the python3 transition?

I need some help after all.  Cythonizing of src/sage/arith/long.pxd is
failing like so:

Error compiling Cython file:
------------------------------------------------------------
...

from cpython.object cimport Py_SIZE
from cpython.int cimport PyInt_AS_LONG
from cpython.long cimport PyLong_AsLong
from cpython.number cimport PyNumber_Index, PyIndex_Check
from cpython.longintrepr cimport PyLongObject, PyLong_SHIFT, digit
^
------------------------------------------------------------

sage/arith/long.pxd:22:0: 'cpython/longintrepr/PyLongObject.pxd' not found


There is exactly one use of PyLongObject, on line 211:

    cdef const digit* D = (<PyLongObject*>x).ob_digit

This code is translating between gmp mpz_t objects and python
integers.  The error seems to be due to a change in cython, not in
python itself.  Still, I'm not sure how to fix the code so that cython
will accept it.

This is from Includes/cpython/longintrepr.pxd in Cython 0.28.4, which
does not trigger the above error:

    ctypedef struct PyLongObject:
        digit* ob_digit

This is from the same file in Cython 0.29~rc2-1, which does trigger
the above error:

    ctypedef class __builtin__.py_long [object PyLongObject]:
        cdef digit* ob_digit

If one of you python experts out there could tell me how the sagemath
code needs to change to get access to x's ob_digit, I would appreciate
it very much.  Thank you,
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux